Author: remm
Date: Mon Jan 18 15:03:55 2016
New Revision: 1725283

URL: http://svn.apache.org/viewvc?rev=1725283&view=rev
Log:
Javadoc fixes.

Modified:
    tomcat/trunk/java/org/apache/tomcat/jni/Address.java
    tomcat/trunk/java/org/apache/tomcat/jni/Buffer.java
    tomcat/trunk/java/org/apache/tomcat/jni/Directory.java
    tomcat/trunk/java/org/apache/tomcat/jni/File.java
    tomcat/trunk/java/org/apache/tomcat/jni/Global.java
    tomcat/trunk/java/org/apache/tomcat/jni/Local.java
    tomcat/trunk/java/org/apache/tomcat/jni/Lock.java
    tomcat/trunk/java/org/apache/tomcat/jni/Mmap.java
    tomcat/trunk/java/org/apache/tomcat/jni/Multicast.java
    tomcat/trunk/java/org/apache/tomcat/jni/OS.java
    tomcat/trunk/java/org/apache/tomcat/jni/Poll.java
    tomcat/trunk/java/org/apache/tomcat/jni/Pool.java
    tomcat/trunk/java/org/apache/tomcat/jni/Proc.java
    tomcat/trunk/java/org/apache/tomcat/jni/Procattr.java
    tomcat/trunk/java/org/apache/tomcat/jni/Registry.java
    tomcat/trunk/java/org/apache/tomcat/jni/SSL.java
    tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java
    tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java
    tomcat/trunk/java/org/apache/tomcat/jni/Shm.java
    tomcat/trunk/java/org/apache/tomcat/jni/Socket.java
    tomcat/trunk/java/org/apache/tomcat/jni/Status.java
    tomcat/trunk/java/org/apache/tomcat/jni/Stdlib.java
    tomcat/trunk/java/org/apache/tomcat/jni/Thread.java
    tomcat/trunk/java/org/apache/tomcat/jni/Time.java
    tomcat/trunk/java/org/apache/tomcat/jni/User.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Address.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Address.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Address.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Address.java Mon Jan 18 15:03:55 
2016
@@ -28,12 +28,14 @@ public class Address {
      * Fill the Sockaddr class from apr_sockaddr_t
      * @param info Sockaddr class to fill
      * @param sa Structure pointer
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean fill(Sockaddr info, long sa);
 
     /**
      * Create the Sockaddr object from apr_sockaddr_t
      * @param sa Structure pointer
+     * @return the socket address
      */
     public static native Sockaddr getInfo(long sa);
 
@@ -59,6 +61,7 @@ public class Address {
      * </PRE>
      * @param p The pool for the apr_sockaddr_t and associated storage.
      * @return The new apr_sockaddr_t.
+     * @throws Exception Operation failed
      */
     public static native long info(String hostname, int family,
                                    int port, int flags, long p)
@@ -93,6 +96,7 @@ public class Address {
      * @param which Which interface do we want the apr_sockaddr_t for?
      * @param sock The socket to use
      * @return The returned apr_sockaddr_t.
+     * @throws Exception An error occurred
      */
     public static native long get(int which, long sock)
         throws Exception;
@@ -104,8 +108,7 @@ public class Address {
      *
      * @param a One of the APR socket addresses.
      * @param b The other APR socket address.
-     * The return value will be True if the addresses
-     * are equivalent.
+     * @return <code>true</code> if the addresses are equal
      */
     public static native boolean equal(long a, long b);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Buffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Buffer.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Buffer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Buffer.java Mon Jan 18 15:03:55 2016
@@ -77,12 +77,14 @@ public class Buffer {
     /**
      * Returns the memory address of the ByteBuffer.
      * @param buf Previously allocated ByteBuffer.
+     * @return the memory address
      */
     public static native long address(ByteBuffer buf);
 
     /**
      * Returns the allocated memory size of the ByteBuffer.
      * @param buf Previously allocated ByteBuffer.
+     * @return the size
      */
     public static native long size(ByteBuffer buf);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Directory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Directory.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Directory.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Directory.java Mon Jan 18 15:03:55 
2016
@@ -28,15 +28,18 @@ public class Directory {
      * @param path the path for the directory to be created. (use / on all 
systems)
      * @param perm Permissions for the new directory.
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int make(String path, int perm, long pool);
 
-    /** Creates a new directory on the file system, but behaves like
+    /**
+     * Creates a new directory on the file system, but behaves like
      * 'mkdir -p'. Creates intermediate directories as required. No error
      * will be reported if PATH already exists.
      * @param path the path for the directory to be created. (use / on all 
systems)
      * @param perm Permissions for the new directory.
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int makeRecursive(String path, int perm, long pool);
 
@@ -44,6 +47,7 @@ public class Directory {
      * Remove directory from the file system.
      * @param path the path for the directory to be removed. (use / on all 
systems)
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int remove(String path, long pool);
 
@@ -57,7 +61,6 @@ public class Directory {
      * directory is found, that location is cached by the library.  Thus,
      * callers only pay the cost of this algorithm once if that one time
      * is successful.
-     *
      */
     public static native String tempGet(long pool);
 
@@ -66,6 +69,7 @@ public class Directory {
      * @param dirname The full path to the directory (use / on all systems)
      * @param pool The pool to use.
      * @return The opened directory descriptor.
+     * @throws Error An error occurred
      */
     public static native long open(String dirname, long pool)
         throws Error;
@@ -73,12 +77,14 @@ public class Directory {
     /**
      * close the specified directory.
      * @param thedir the directory descriptor to close.
+     * @return the operation result
      */
     public static native int close(long thedir);
 
     /**
      * Rewind the directory to the first entry.
      * @param thedir the directory descriptor to rewind.
+     * @return the operation result
      */
     public static native int rewind(long thedir);
 
@@ -89,6 +95,7 @@ public class Directory {
      * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
      * @param thedir the directory descriptor returned from apr_dir_open
      * No ordering is guaranteed for the entries read.
+     * @return the operation result
      */
     public static native int read(FileInfo finfo, int wanted, long thedir);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/File.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/File.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/File.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/File.java Mon Jan 18 15:03:55 2016
@@ -217,6 +217,7 @@ public class File {
      * If perm is APR_OS_DEFAULT and the file is being created,
      * appropriate default permissions will be used.
      * @return The opened file descriptor.
+     * @throws Error An error occurred
      */
     public static native long open(String fname, int flag, int perm, long pool)
         throws Error;
@@ -224,12 +225,14 @@ public class File {
     /**
      * Close the specified file.
      * @param file The file descriptor to close.
+     * @return the operation status
      */
     public static native int close(long file);
 
     /**
      * Flush the file's buffer.
      * @param thefile The file descriptor to flush
+     * @return the operation status
      */
     public static native int flush(long thefile);
 
@@ -247,7 +250,7 @@ public class File {
      * with a string that makes the filename unique. Since it will  be  
modified,
      * template must not be a string constant, but should be declared as a 
character
      * array.
-     *
+     * @throws Error An error occurred
      */
     public static native long mktemp(String templ, int flags, long pool)
         throws Error;
@@ -258,6 +261,7 @@ public class File {
      * @param pool The pool to use.
      * If the file is open, it won't be removed until all
      * instances are closed.
+     * @return the operation status
      */
     public static native int remove(String path, long pool);
 
@@ -269,6 +273,7 @@ public class File {
      * @param fromPath The full path to the original file (using / on all 
systems)
      * @param toPath The full path to the new file (using / on all systems)
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int rename(String fromPath, String toPath, long pool);
 
@@ -283,6 +288,7 @@ public class File {
      *     value APR_FILE_SOURCE_PERMS may be given, in which case the source
      *     file's permissions are copied.
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int copy(String fromPath, String toPath, int perms, 
long pool);
 
@@ -296,6 +302,7 @@ public class File {
      *     value APR_FILE_SOURCE_PERMS may be given, in which case the source
      *     file's permissions are copied.
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int append(String fromPath, String toPath, int perms, 
long pool);
 
@@ -303,6 +310,7 @@ public class File {
      * Write the string into the specified file.
      * @param str The string to write. Must be NUL terminated!
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int puts(byte [] str, long thefile);
 
@@ -317,6 +325,7 @@ public class File {
      * </PRE>
      * @param offset The offset to move the pointer to.
      * @return Offset the pointer was actually moved to.
+     * @throws Error If an error occurs reading the file
      */
     public static native long seek(long thefile, int where, long offset)
         throws Error;
@@ -325,6 +334,7 @@ public class File {
      * Write a character into the specified file.
      * @param ch The character to write.
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int putc(byte ch, long thefile);
 
@@ -332,6 +342,7 @@ public class File {
      * Put a character back onto a specified stream.
      * @param ch The character to write.
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int ungetc(byte ch, long thefile);
 
@@ -535,6 +546,7 @@ public class File {
      * @param buf The buffer to store the string in.
      * @param offset Start offset in buf
      * @param thefile The file descriptor to read from
+     * @return the number of bytes read.
      */
     public static native int gets(byte[] buf,  int offset, long thefile);
 
@@ -543,6 +555,7 @@ public class File {
      * Read a character from the specified file.
      * @param thefile The file descriptor to read from
      * @return The read character
+     * @throws Error If an error occurs reading the file
      */
     public static native int getc(long thefile)
         throws Error;
@@ -555,8 +568,9 @@ public class File {
     public static native int eof(long fptr);
 
     /**
-     * return the file name of the current file.
+     * Return the file name of the current file.
      * @param thefile The currently open file.
+     * @return the name
      */
     public static native String nameGet(long thefile);
 
@@ -569,7 +583,7 @@ public class File {
      * APR_ENOTIMPL.
      * @param fname The file (name) to apply the permissions to.
      * @param perms The permission bits to apply to the file.
-     *
+     * @return the operation status
      */
     public static native int permsSet(String fname, int perms);
 
@@ -590,6 +604,7 @@ public class File {
      * </PRE>
      * @param mask Mask of valid bits in attributes.
      * @param pool the pool to use.
+     * @return the operation status
      */
     public static native int  attrsSet(String fname, int attributes, int mask, 
long pool);
 
@@ -600,6 +615,7 @@ public class File {
      * @param fname The full path to the file (using / on all systems)
      * @param mtime The mtime to apply to the file in microseconds
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int  mtimeSet(String fname, long mtime, long pool);
 
@@ -611,12 +627,14 @@ public class File {
      * block.
      * @param thefile The file to lock.
      * @param type The type of lock to establish on the file.
+     * @return the operation status
      */
     public static native int lock(long thefile, int type);
 
     /**
      * Remove any outstanding locks on the file.
      * @param thefile The file to unlock.
+     * @return the operation status
      */
     public static native int unlock(long thefile);
 
@@ -632,6 +650,7 @@ public class File {
      * Truncate the file's length to the specified offset
      * @param fp The file to truncate
      * @param offset The offset to truncate to.
+     * @return the operation status
      */
     public static native int trunc(long fp, long offset);
 
@@ -640,6 +659,7 @@ public class File {
      * @param io io[0] The file descriptors to use as input to the pipe.
      *           io[1] The file descriptor to use as output from the pipe.
      * @param pool The pool to operate on.
+     * @return the operation status
      */
     public static native int pipeCreate(long [] io, long pool);
 
@@ -647,6 +667,7 @@ public class File {
      * Get the timeout value for a pipe or manipulate the blocking state.
      * @param thepipe The pipe we are getting a timeout for.
      * @return The current timeout value in microseconds.
+     * @throws Error If an error occurs
      */
     public static native long pipeTimeoutGet(long thepipe)
         throws Error;
@@ -656,6 +677,7 @@ public class File {
      * @param thepipe The pipe we are setting a timeout on.
      * @param timeout The timeout value in microseconds.  Values &lt; 0 mean
      *        wait forever, 0 means do not wait at all.
+     * @return the operation status
      */
     public static native int pipeTimeoutSet(long thepipe, long timeout);
 
@@ -666,6 +688,7 @@ public class File {
      * @param oldFile The file to duplicate.
      * @param pool The pool to use for the new file.
      * @return Duplicated file structure.
+     * @throws Error If an error occurs reading the file descriptor
      */
     public static native long dup(long newFile, long oldFile, long pool)
         throws Error;
@@ -676,7 +699,7 @@ public class File {
      * newFile MUST point at a valid apr_file_t. It cannot be NULL.
      * @param oldFile The file to duplicate.
      * @param pool The pool to use for the new file.
-     * @return Status code.
+     * @return the operation status
      */
     public static native int dup2(long newFile, long oldFile, long pool);
 
@@ -688,6 +711,7 @@ public class File {
      * @param fname The name of the file to stat.
      * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
      * @param pool the pool to use to allocate the new file.
+     * @return the operation status
      */
     public static native int stat(FileInfo finfo, String fname, int wanted, 
long pool);
 
@@ -706,6 +730,7 @@ public class File {
      * @param finfo Where to store the information about the file.
      * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
      * @param thefile The file to get information about.
+     * @return the operation status
      */
     public static native int infoGet(FileInfo finfo, int wanted, long thefile);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Global.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Global.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Global.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Global.java Mon Jan 18 15:03:55 2016
@@ -45,6 +45,7 @@ public class Global {
      * </PRE>
      * @param pool the pool from which to allocate the mutex.
      * @return Newly created mutex.
+     * @throws Error If an error occurred
      */
     public static native long create(String fname, int mech, long pool)
         throws Error;
@@ -59,6 +60,7 @@ public class Global {
      * This function must be called to maintain portability, even
      *         if the underlying lock mechanism does not require it.
      * @return Newly opened mutex.
+     * @throws Error If an error occurred
      */
     public static native long childInit(String fname, long pool)
         throws Error;
@@ -67,6 +69,7 @@ public class Global {
      * Acquire the lock for the given mutex. If the mutex is already locked,
      * the current thread will be put to sleep until the lock becomes 
available.
      * @param mutex the mutex on which to acquire the lock.
+     * @return the operation status
      */
     public static native int lock(long mutex);
 
@@ -76,18 +79,21 @@ public class Global {
      * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine
      * if the return value was APR_EBUSY, for portability reasons.
      * @param mutex the mutex on which to attempt the lock acquiring.
+     * @return the operation status
      */
     public static native int trylock(long mutex);
 
     /**
      * Release the lock for the given mutex.
      * @param mutex the mutex from which to release the lock.
+     * @return the operation status
      */
     public static native int unlock(long mutex);
 
     /**
      * Destroy the mutex and free the memory associated with the lock.
      * @param mutex the mutex to destroy.
+     * @return the operation status
      */
     public static native int destroy(long mutex);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Local.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Local.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Local.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Local.java Mon Jan 18 15:03:55 2016
@@ -17,7 +17,8 @@
 
 package org.apache.tomcat.jni;
 
-/** Local socket
+/**
+ * Local socket.
  *
  * @author Mladen Turk
  */
@@ -28,6 +29,7 @@ public class Local {
      * @param path The address of the new socket.
      * @param cont The parent pool to use
      * @return The new socket that has been set up.
+     * @throws Exception If socket creation failed
      */
     public static native long create(String path, long cont)
         throws Exception;
@@ -38,6 +40,7 @@ public class Local {
      * @param sa The socket address to bind to
      * This may be where we will find out if there is any other process
      *      using the selected port.
+     * @return the operation status
      */
     public static native int bind(long sock, long sa);
 
@@ -47,7 +50,7 @@ public class Local {
      * @param backlog The number of outstanding connections allowed in the 
sockets
      *                listen queue.  If this value is less than zero, for NT 
pipes
      *                the number of instances is unlimited.
-     *
+     * @return the operation status
      */
     public static native int listen(long sock, int backlog);
 
@@ -57,6 +60,7 @@ public class Local {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception If accept failed
      */
     public static native long accept(long sock)
         throws Exception;
@@ -67,6 +71,7 @@ public class Local {
      * @param sock The socket we wish to use for our side of the connection
      * @param sa The address of the machine we wish to connect to.
      *           Unused for NT Pipes.
+     * @return the operation status
      */
     public static native int connect(long sock, long sa);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Lock.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Lock.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Lock.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Lock.java Mon Jan 18 15:03:55 2016
@@ -54,6 +54,7 @@ public class Lock {
      * </PRE>
      * @param pool the pool from which to allocate the mutex.
      * @return Newly created mutex.
+     * @throws Error An error occurred
      */
     public static native long create(String fname, int mech, long pool)
         throws Error;
@@ -68,6 +69,7 @@ public class Lock {
      *              same one that was passed to apr_proc_mutex_create().
      * @param pool The pool to operate on.
      * @return Newly opened mutex.
+     * @throws Error An error occurred
      */
     public static native long childInit(String fname, long pool)
         throws Error;
@@ -76,6 +78,7 @@ public class Lock {
      * Acquire the lock for the given mutex. If the mutex is already locked,
      * the current thread will be put to sleep until the lock becomes 
available.
      * @param mutex the mutex on which to acquire the lock.
+     * @return the operation status
      */
     public static native int lock(long mutex);
 
@@ -85,24 +88,29 @@ public class Lock {
      * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine
      * if the return value was APR_EBUSY, for portability reasons.
      * @param mutex the mutex on which to attempt the lock acquiring.
+     * @return the operation status
      */
     public static native int trylock(long mutex);
 
     /**
      * Release the lock for the given mutex.
      * @param mutex the mutex from which to release the lock.
+     * @return the operation status
      */
     public static native int unlock(long mutex);
 
     /**
      * Destroy the mutex and free the memory associated with the lock.
      * @param mutex the mutex to destroy.
+     * @return the operation status
      */
     public static native int destroy(long mutex);
 
     /**
      * Return the name of the lockfile for the mutex, or NULL
      * if the mutex doesn't use a lock file
+     * @param mutex the name of the mutex
+     * @return the name of the lock file
      */
     public static native String lockfile(long mutex);
 
@@ -110,11 +118,13 @@ public class Lock {
      * Display the name of the mutex, as it relates to the actual method used.
      * This matches the valid options for Apache's AcceptMutex directive
      * @param mutex the name of the mutex
+     * @return the name of the mutex
      */
     public static native String name(long mutex);
 
     /**
      * Display the name of the default mutex: APR_LOCK_DEFAULT
+     * @return the default name
      */
     public static native String defname();
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Mmap.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Mmap.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Mmap.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Mmap.java Mon Jan 18 15:03:55 2016
@@ -40,6 +40,7 @@ public class Mmap {
      * </PRE>
      * @param pool The pool to use when creating the mmap.
      * @return The newly created mmap'ed file.
+     * @throws Error Error creating memory mapping
      */
     public static native long create(long file, long offset, long size, int 
flag, long pool)
         throws Error;
@@ -49,6 +50,7 @@ public class Mmap {
      * @param mmap The mmap to duplicate.
      * @param pool The pool to use for new_mmap.
      * @return Duplicated mmap'ed file.
+     * @throws Error Error duplicating memory mapping
      */
     public static native long dup(long mmap, long pool)
         throws Error;
@@ -56,6 +58,7 @@ public class Mmap {
     /**
      * Remove a mmap'ed.
      * @param mm The mmap'ed file.
+     * @return the operation status
      */
     public static native int delete(long mm);
 
@@ -64,6 +67,7 @@ public class Mmap {
      * @param mm The mmap'ed file.
      * @param offset The offset to move to.
      * @return The pointer to the offset specified.
+     * @throws Error Error reading file
      */
     public static native long offset(long mm, long offset)
         throws Error;

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Multicast.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Multicast.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Multicast.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Multicast.java Mon Jan 18 15:03:55 
2016
@@ -31,6 +31,7 @@ public class Multicast {
      *              default multicast interface will be used. (OS Dependent)
      * @param source Source Address to accept transmissions from (non-NULL
      *               implies Source-Specific Multicast)
+     * @return the operation status
      */
     public static native int join(long sock, long join,
                                   long iface, long source);
@@ -44,6 +45,7 @@ public class Multicast {
      *              default multicast interface will be used. (OS Dependent)
      * @param source Source Address to accept transmissions from (non-NULL
      *               implies Source-Specific Multicast)
+     * @return the operation status
      */
     public static native int leave(long sock, long addr,
                                    long iface, long source);
@@ -55,6 +57,7 @@ public class Multicast {
      * <br><b>Remark :</b> If the TTL is 0, packets will only be seen
      * by sockets on the local machine,
      * and only when multicast loopback is enabled.
+     * @return the operation status
      */
     public static native int hops(long sock, int ttl);
 
@@ -62,6 +65,7 @@ public class Multicast {
      * Toggle IP Multicast Loopback
      * @param sock The socket to set multicast loopback
      * @param opt false=disable, true=enable
+     * @return the operation status
      */
     public static native int loopback(long sock, boolean opt);
 
@@ -70,6 +74,7 @@ public class Multicast {
      * Set the Interface to be used for outgoing Multicast Transmissions.
      * @param sock The socket to set the multicast interface on
      * @param iface Address of the interface to use for Multicast
+     * @return the operation status
      */
     public static native int ointerface(long sock, long iface);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/OS.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/OS.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/OS.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/OS.java Mon Jan 18 15:03:55 2016
@@ -58,6 +58,7 @@ public class OS {
     /**
      * Get the name of the system default character set.
      * @param pool the pool to allocate the name from, if needed
+     * @return the encoding
      */
     public static native String defaultEncoding(long pool);
 
@@ -66,6 +67,7 @@ public class OS {
      * Defers to apr_os_default_encoding if the current locale's
      * data can't be retrieved on this system.
      * @param pool the pool to allocate the name from, if needed
+     * @return the encoding
      */
     public static native String localeEncoding(long pool);
 
@@ -73,6 +75,7 @@ public class OS {
      * Generate random bytes.
      * @param buf Buffer to fill with random bytes
      * @param len Length of buffer in bytes
+     * @return the operation status
      */
     public static native int random(byte [] buf, int len);
 
@@ -102,6 +105,7 @@ public class OS {
      * </PRE>
      * @param inf array that will be filled with system information.
      *            Array length must be at least 16.
+     * @return the operation status
      */
     public static native int info(long [] inf);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Poll.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Poll.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Poll.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Poll.java Mon Jan 18 15:03:55 2016
@@ -66,12 +66,14 @@ public class Poll {
      * @param flags Optional flags to modify the operation of the pollset.
      * @param ttl Maximum time to live for a particular socket.
      * @return  The pointer in which to return the newly created object
+     * @throws Error Pollset creation failed
      */
     public static native long create(int size, long p, int flags, long ttl)
         throws Error;
     /**
      * Destroy a pollset object
      * @param pollset The pollset to destroy
+     * @return the operation status
      */
     public static native int destroy(long pollset);
 
@@ -80,6 +82,7 @@ public class Poll {
      * @param pollset The pollset to which to add the socket
      * @param sock The sockets to add
      * @param reqevents requested events
+     * @return the operation status
      */
     public static native int add(long pollset, long sock,
                                  int reqevents);
@@ -90,6 +93,7 @@ public class Poll {
      * @param sock The sockets to add
      * @param reqevents requested events
      * @param timeout requested timeout in microseconds (-1 for infinite)
+     * @return the operation status
      */
     public static native int addWithTimeout(long pollset, long sock,
                                             int reqevents, long timeout);
@@ -98,6 +102,7 @@ public class Poll {
      * Remove a descriptor from a pollset
      * @param pollset The pollset from which to remove the descriptor
      * @param sock The socket to remove
+     * @return the operation status
      */
     public static native int remove(long pollset, long sock);
 
@@ -167,7 +172,7 @@ public class Poll {
     /**
      * Make poll() return.
      *
-     * @param   pollset
+     * @param   pollset The pollset to use
      * @return  Negative APR error code
      */
     public static native int interrupt(long pollset);
@@ -175,7 +180,7 @@ public class Poll {
     /**
      * Check if interrupt() is allowed.
      *
-     * @param pollset
+     * @param pollset The pollset to use
      * @return  <code>true</code> if {@link #interrupt(long)} is allowed, else
      *          <code>false</code>
      */

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Pool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Pool.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Pool.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Pool.java Mon Jan 18 15:03:55 2016
@@ -150,6 +150,7 @@ public class Pool {
      * Return the data associated with the current pool.
      * @param key The key for the data to retrieve
      * @param pool The current pool.
+     * @return the data
      */
      public static native Object dataGet(long pool, String key);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Proc.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Proc.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Proc.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Proc.java Mon Jan 18 15:03:55 2016
@@ -102,6 +102,7 @@ public class Proc {
      * Allocate apr_proc_t structure from pool
      * This is not an apr function.
      * @param cont The pool to use.
+     * @return the pointer
      */
     public static native long alloc(long cont);
 
@@ -119,6 +120,7 @@ public class Proc {
      * Create a new process and execute a new program within that process.
      * This function returns without waiting for the new process to terminate;
      * use apr_proc_wait for that.
+     * @param proc The process handle
      * @param progname The program to run
      * @param args The arguments to pass to the new program.  The first
      *             one should be the program name.
@@ -186,6 +188,7 @@ public class Proc {
      *               child is dead or not.
      * </PRE>
      * @param pool Pool to allocate child information out of.
+     * @return the operation status
      */
     public static native int waitAllProcs(long proc, int [] exit,
                                           int waithow, long pool);
@@ -195,6 +198,7 @@ public class Proc {
      * @param daemonize set to non-zero if the process should daemonize
      *                  and become a background process, else it will
      *                  stay in the foreground.
+     * @return the operation status
      */
     public static native int detach(int daemonize);
 
@@ -202,6 +206,7 @@ public class Proc {
      * Terminate a process.
      * @param proc The process to terminate.
      * @param sig How to kill the process.
+     * @return the operation status
      */
     public static native int kill(long proc, int sig);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Procattr.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Procattr.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Procattr.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Procattr.java Mon Jan 18 15:03:55 
2016
@@ -27,6 +27,7 @@ public class Procattr {
      * Create and initialize a new procattr variable
      * @param cont The pool to use
      * @return The newly created procattr.
+     * @throws Error An error occurred
      */
     public static native long create(long cont)
         throws Error;
@@ -38,8 +39,10 @@ public class Procattr {
      * @param in Should stdin be a pipe back to the parent?
      * @param out Should stdout be a pipe back to the parent?
      * @param err Should stderr be a pipe back to the parent?
+     * @return the operation status
      */
     public static native int ioSet(long attr, int in, int out, int err);
+
     /**
      * Set the child_in and/or parent_in values to existing apr_file_t values.
      * <br>
@@ -52,6 +55,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param in apr_file_t value to use as child_in. Must be a valid file.
      * @param parent apr_file_t value to use as parent_in. Must be a valid 
file.
+     * @return the operation status
      */
     public static native int childInSet(long attr, long in, long parent);
 
@@ -65,6 +69,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param out apr_file_t value to use as child_out. Must be a valid file.
      * @param parent apr_file_t value to use as parent_out. Must be a valid 
file.
+     * @return the operation status
      */
     public static native int childOutSet(long attr, long out, long parent);
 
@@ -78,6 +83,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param err apr_file_t value to use as child_err. Must be a valid file.
      * @param parent apr_file_t value to use as parent_err. Must be a valid 
file.
+     * @return the operation status
      */
     public static native int childErrSet(long attr, long err, long parent);
 
@@ -87,6 +93,7 @@ public class Procattr {
      * @param dir Which dir to start in.  By default, this is the same dir as
      *            the parent currently resides in, when the createprocess call
      *            is made.
+     * @return the operation status
      */
     public static native int dirSet(long attr, String dir);
 
@@ -100,6 +107,7 @@ public class Procattr {
      * APR_PROGRAM_ENV  --  Executable program, copy environment
      * APR_PROGRAM_PATH --  Executable program on PATH, copy env
      * </PRE>
+     * @return the operation status
      */
     public static native int cmdtypeSet(long attr, int cmd);
 
@@ -107,6 +115,7 @@ public class Procattr {
      * Determine if the child should start in detached state.
      * @param attr The procattr we care about.
      * @param detach Should the child start in detached state?  Default is no.
+     * @return the operation status
      */
     public static native int detachSet(long attr, int detach);
 
@@ -122,6 +131,7 @@ public class Procattr {
      * fork() is used.  This leads to extra overhead in the calling
      * process, but that may help the application handle such
      * errors more gracefully.
+     * @return the operation status
      */
     public static native int errorCheckSet(long attr, int chk);
 
@@ -131,6 +141,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param addrspace Should the child start in its own address space?  
Default
      * is no on NetWare and yes on other platforms.
+     * @return the operation status
      */
     public static native int addrspaceSet(long attr, int addrspace);
 
@@ -156,6 +167,7 @@ public class Procattr {
      * @param password User password if needed. Password is needed on WIN32
      *                 or any other platform having
      *                 APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set.
+     * @return the operation status
      */
     public static native int userSet(long attr, String username, String 
password);
 
@@ -163,8 +175,8 @@ public class Procattr {
      * Set the group used for running process
      * @param attr The procattr we care about.
      * @param groupname The group name  used
+     * @return the operation status
      */
     public static native int groupSet(long attr, String groupname);
 
-
 }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Registry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Registry.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Registry.java Mon Jan 18 15:03:55 
2016
@@ -57,6 +57,7 @@ public class Registry {
      * @param sam Access mask that specifies the access rights for the key.
      * @param pool Pool used for native memory allocation
      * @return Opened Registry key
+     * @throws Error An error occurred
      */
     public static native long create(int root, String name, int sam, long pool)
         throws Error;
@@ -68,6 +69,7 @@ public class Registry {
      * @param sam Access mask that specifies the access rights for the key.
      * @param pool Pool used for native memory allocation
      * @return Opened Registry key
+     * @throws Error An error occurred
      */
     public static native long open(int root, String name, int sam, long pool)
         throws Error;
@@ -75,6 +77,7 @@ public class Registry {
     /**
      * Close the specified Registry key.
      * @param key The Registry key descriptor to close.
+     * @return the operation status
      */
     public static native int close(long key);
 
@@ -91,6 +94,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native int getValueI(long key, String name)
         throws Error;
@@ -100,6 +104,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native long getValueJ(long key, String name)
         throws Error;
@@ -117,6 +122,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native String getValueS(long key, String name)
         throws Error;
@@ -126,6 +132,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native String[] getValueA(long key, String name)
         throws Error;
@@ -135,6 +142,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native byte[] getValueB(long key, String name)
         throws Error;
@@ -198,6 +206,7 @@ public class Registry {
      * Enumerate the Registry subkeys
      * @param key The Registry key descriptor to use.
      * @return Array of all subkey names
+     * @throws Error An error occurred
      */
     public static native String[] enumKeys(long key)
         throws Error;
@@ -206,6 +215,7 @@ public class Registry {
      * Enumerate the Registry values
      * @param key The Registry key descriptor to use.
      * @return Array of all value names
+     * @throws Error An error occurred
      */
     public static native String[] enumValues(long key)
         throws Error;

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSL.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/SSL.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSL.java Mon Jan 18 15:03:55 2016
@@ -282,6 +282,7 @@ public final class SSL {
      *        set, $HOME/.rnd otherwise.
      *        In case both files are unavailable builtin
      *        random seed generator is used.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randLoad(String filename);
 
@@ -290,6 +291,7 @@ public final class SSL {
      * file <code>filename</code> which can be used to initialize the PRNG
      * by calling randLoad in a later session.
      * @param filename Filename to save the data
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randSave(String filename);
 
@@ -298,6 +300,7 @@ public final class SSL {
      * @param filename Filename to save the data
      * @param len The length of random sequence in bytes
      * @param base64 Output the data in Base64 encoded format
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randMake(String filename, int len,
                                           boolean base64);
@@ -315,6 +318,7 @@ public final class SSL {
      * @param pool The pool to use.
      * @param callback BIOCallback to use
      * @return New BIO handle
+     * @throws Exception An error occurred
      */
      public static native long newBIO(long pool, BIOCallback callback)
             throws Exception;
@@ -340,6 +344,7 @@ public final class SSL {
 
     /**
      * Return last SSL error string
+     * @return the error string
      */
     public static native String getLastError();
 
@@ -359,6 +364,8 @@ public final class SSL {
 
     /**
      * Return the handshake completed count.
+     * @param ssl SSL pointer
+     * @return the count
      */
     public static native int getHandshakeCount(long ssl);
 
@@ -400,63 +407,71 @@ public final class SSL {
      * SSL_get_error
      * @param ssl SSL pointer (SSL *)
      * @param ret TLS/SSL I/O return value
+     * @return the error status
      */
     public static native int getError(long ssl, int ret);
 
     /**
      * BIO_ctrl_pending.
      * @param bio BIO pointer (BIO *)
+     * @return the pending bytes count
      */
     public static native int pendingWrittenBytesInBIO(long bio);
 
     /**
      * SSL_pending.
      * @param ssl SSL pointer (SSL *)
+     * @return the pending bytes count
      */
     public static native int pendingReadableBytesInSSL(long ssl);
 
     /**
      * BIO_write.
-     * @param bio
-     * @param wbuf
-     * @param wlen
+     * @param bio BIO pointer
+     * @param wbuf Buffer pointer
+     * @param wlen Write length
+     * @return the bytes count written
      */
     public static native int writeToBIO(long bio, long wbuf, int wlen);
 
     /**
      * BIO_read.
-     * @param bio
-     * @param rbuf
-     * @param rlen
+     * @param bio BIO pointer
+     * @param rbuf Buffer pointer
+     * @param rlen Read length
+     * @return the bytes count read
      */
     public static native int readFromBIO(long bio, long rbuf, int rlen);
 
     /**
      * SSL_write.
      * @param ssl the SSL instance (SSL *)
-     * @param wbuf
-     * @param wlen
+     * @param wbuf Buffer pointer
+     * @param wlen Write length
+     * @return the bytes count written
      */
     public static native int writeToSSL(long ssl, long wbuf, int wlen);
 
     /**
      * SSL_read
      * @param ssl the SSL instance (SSL *)
-     * @param rbuf
-     * @param rlen
+     * @param rbuf Buffer pointer
+     * @param rlen Read length
+     * @return the bytes count read
      */
     public static native int readFromSSL(long ssl, long rbuf, int rlen);
 
     /**
      * SSL_get_shutdown
      * @param ssl the SSL instance (SSL *)
+     * @return the operation status
      */
     public static native int getShutdown(long ssl);
 
     /**
      * SSL_set_shutdown
      * @param ssl the SSL instance (SSL *)
-     * @param mode
+     * @param mode Shutdown mode
      */
     public static native void setShutdown(long ssl, int mode);
 
@@ -481,55 +496,63 @@ public final class SSL {
 
     /**
      * BIO_free
-     * @param bio
+     * @param bio BIO pointer
      */
     public static native void freeBIO(long bio);
 
     /**
      * SSL_shutdown
      * @param ssl the SSL instance (SSL *)
+     * @return the operation status
      */
     public static native int shutdownSSL(long ssl);
 
     /**
      * Get the error number representing the last error OpenSSL encountered on
      * this thread.
+     * @return the last error number
      */
     public static native int getLastErrorNumber();
 
     /**
      * SSL_get_cipher.
      * @param ssl the SSL instance (SSL *)
+     * @return the cipher name
      */
     public static native String getCipherForSSL(long ssl);
 
     /**
      * SSL_get_version
      * @param ssl the SSL instance (SSL *)
+     * @return the SSL version in use
      */
     public static native String getVersion(long ssl);
 
     /**
      * SSL_do_handshake
      * @param ssl the SSL instance (SSL *)
+     * @return the handshake status
      */
     public static native int doHandshake(long ssl);
 
     /**
      * SSL_renegotiate
      * @param ssl the SSL instance (SSL *)
+     * @return the operation status
      */
     public static native int renegotiate(long ssl);
 
     /**
      * SSL_in_init.
-     * @param SSL
+     * @param ssl the SSL instance (SSL *)
+     * @return the status
      */
-    public static native int isInInit(long SSL);
+    public static native int isInInit(long ssl);
 
     /**
      * SSL_get0_next_proto_negotiated
      * @param ssl the SSL instance (SSL *)
+     * @return the NPN protocol negotiated
      */
     public static native String getNextProtoNegotiated(long ssl);
 
@@ -540,20 +563,28 @@ public final class SSL {
     /**
      * SSL_get0_alpn_selected
      * @param ssl the SSL instance (SSL *)
+     * @return the ALPN protocol negotiated
      */
     public static native String getAlpnSelected(long ssl);
 
     /**
      * Get the peer certificate chain or {@code null} if non was send.
+     * @param ssl the SSL instance (SSL *)
+     * @return the certificate chain bytes
      */
     public static native byte[][] getPeerCertChain(long ssl);
 
     /**
      * Get the peer certificate or {@code null} if non was send.
+     * @param ssl the SSL instance (SSL *)
+     * @return the certificate bytes
      */
     public static native byte[] getPeerCertificate(long ssl);
-    /*
+
+    /**
      * Get the error number representing for the given {@code errorNumber}.
+     * @param errorNumber The error code
+     * @return an error message
      */
     public static native String getErrorString(long errorNumber);
 
@@ -634,6 +665,8 @@ public final class SSL {
      * was read but before the HTTP response is sent.
      * @param ssl the SSL instance (SSL *)
      * @param ciphers an SSL cipher specification
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCipherSuites(long ssl, String ciphers)
             throws Exception;

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java Mon Jan 18 15:03:55 
2016
@@ -144,6 +144,8 @@ public final class SSLContext {
      * was read but before the HTTP response is sent.
      * @param ctx Server or Client context to use.
      * @param ciphers An OpenSSL cipher specification.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCipherSuite(long ctx, String ciphers)
         throws Exception;
@@ -166,6 +168,8 @@ public final class SSLContext {
      * @param ctx Server or Client context to use.
      * @param file File of concatenated PEM-encoded CA CRLs for Client Auth.
      * @param path Directory of PEM-encoded CA Certificates for Client Auth.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCARevocation(long ctx, String file,
                                                  String path)
@@ -190,6 +194,7 @@ public final class SSLContext {
      * @param file File of PEM-encoded Server CA Certificates.
      * @param skipfirst Skip first certificate if chain file is inside
      *                  certificate file.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean setCertificateChainFile(long ctx, String file,
                                                          boolean skipfirst);
@@ -215,6 +220,8 @@ public final class SSLContext {
      * @param password Certificate password. If null and certificate
      *                 is encrypted, password prompt will be displayed.
      * @param idx Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCertificate(long ctx, String cert,
                                                 String key, String password,
@@ -224,38 +231,53 @@ public final class SSLContext {
     /**
      * Set the size of the internal session cache.
      * http://www.openssl.org/docs/ssl/SSL_CTX_sess_set_cache_size.html
+     * @param ctx Server or Client context to use.
+     * @param size The cache size
+     * @return the value set
      */
     public static native long setSessionCacheSize(long ctx, long size);
 
     /**
      * Get the size of the internal session cache.
      * http://www.openssl.org/docs/ssl/SSL_CTX_sess_get_cache_size.html
+     * @param ctx Server or Client context to use.
+     * @return the size
      */
     public static native long getSessionCacheSize(long ctx);
 
     /**
      * Set the timeout for the internal session cache in seconds.
      * http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html
+     * @param ctx Server or Client context to use.
+     * @param timeoutSeconds Timeout value
+     * @return the value set
      */
     public static native long setSessionCacheTimeout(long ctx, long 
timeoutSeconds);
 
     /**
      * Get the timeout for the internal session cache in seconds.
      * http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html
+     * @param ctx Server or Client context to use.
+     * @return the timeout
      */
     public static native long getSessionCacheTimeout(long ctx);
 
     /**
      * Set the mode of the internal session cache and return the previous used 
mode.
+     * @param ctx Server or Client context to use.
+     * @param mode The mode to set
+     * @return the value set
      */
     public static native long setSessionCacheMode(long ctx, long mode);
 
     /**
      * Get the mode of the current used internal session cache.
+     * @param ctx Server or Client context to use.
+     * @return the value set
      */
     public static native long getSessionCacheMode(long ctx);
 
-    /**
+    /*
      * Session resumption statistics methods.
      * http://www.openssl.org/docs/ssl/SSL_CTX_sess_number.html
      */
@@ -274,6 +296,8 @@ public final class SSLContext {
 
     /**
      * Set TLS session keys. This allows us to share keys across TFEs.
+     * @param ctx Server or Client context to use.
+     * @param keys Some session keys
      */
     public static native void setSessionTicketKeys(long ctx, byte[] keys);
 
@@ -297,6 +321,8 @@ public final class SSLContext {
      * @param file File of concatenated PEM-encoded CA Certificates for
      *             Client Auth.
      * @param path Directory of PEM-encoded CA Certificates for Client Auth.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCACertificate(long ctx, String file,
                                                   String path)
@@ -382,7 +408,7 @@ public final class SSLContext {
         return sniCallBack.getSslContext(sniHostName);
     }
 
-    /*
+    /**
      * A map of default SSL Contexts to SNICallBack instances (in Tomcat these
      * are instances of AprEndpoint) that will be used to determine the SSL
      * Context to use bases on the SNI host name. It is structured this way
@@ -486,6 +512,7 @@ public final class SSLContext {
      * @param ctx Server context to use.
      * @param cert DH param file (can be generated from e.g. {@code openssl 
dhparam -rand - 2048 > dhparam.pem} -
      *             see the <a 
href="https://www.openssl.org/docs/apps/dhparam.html";>OpenSSL 
documentation</a>).
+     * @throws Exception An error occurred
      */
     public static native void setTmpDH(long ctx, String cert)
             throws Exception;
@@ -495,6 +522,7 @@ public final class SSLContext {
      * @param ctx Server context to use.
      * @param curveName the name of the elliptic curve to use
      *             (available names can be obtained from {@code openssl 
ecparam -list_curves}).
+     * @throws Exception An error occurred
      */
     public static native void setTmpECDHByCurveName(long ctx, String curveName)
             throws Exception;
@@ -518,6 +546,7 @@ public final class SSLContext {
      * @param cert Byte array with the certificate in DER encoding.
      * @param key Byte array with the Private Key file in PEM format.
      * @param sslAidxRsa Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA.
+     * @return {@code true} if success, {@code false} otherwise.
      */
     public static native boolean setCertificateRaw(long ctx, byte[] cert, 
byte[] key, int sslAidxRsa);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java Mon Jan 18 15:03:55 
2016
@@ -28,6 +28,7 @@ public class SSLSocket {
      * @param ctx SSLContext to use.
      * @param sock APR Socket that already did physical connect or accept.
      * @return APR_STATUS code.
+     * @throws Exception An error occurred
      */
     public static native int attach(long ctx, long sock)
         throws Exception;
@@ -35,6 +36,7 @@ public class SSLSocket {
     /**
      * Do a SSL handshake.
      * @param thesocket The socket to use
+     * @return the handshake status
      */
     public static native int handshake(long thesocket);
 
@@ -51,6 +53,7 @@ public class SSLSocket {
      * only), so Apache has no API hook for this step.
      *
      * @param thesocket The socket to use
+     * @return the operation status
      */
     public static native int renegotiate(long thesocket);
 
@@ -86,6 +89,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return Byte array containing info id value.
+     * @throws Exception An error occurred
      */
     public static native byte[] getInfoB(long sock, int id)
         throws Exception;
@@ -96,6 +100,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return String containing info id value.
+     * @throws Exception An error occurred
      */
     public static native String getInfoS(long sock, int id)
         throws Exception;
@@ -106,6 +111,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return Integer containing info id value or -1 on error.
+     * @throws Exception An error occurred
      */
     public static native int getInfoI(long sock, int id)
         throws Exception;

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Shm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Shm.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Shm.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Shm.java Mon Jan 18 15:03:55 2016
@@ -48,7 +48,7 @@ public class Shm {
      * @param pool the pool from which to allocate the shared memory
      *        structure.
      * @return The created shared memory structure.
-     *
+     * @throws Error An error occurred
      */
     public static native long create(long reqsize, String filename, long pool)
         throws Error;
@@ -62,12 +62,14 @@ public class Shm {
      * @param filename The filename associated with shared-memory segment which
      *        needs to be removed
      * @param pool The pool used for file operations
+     * @return the operation status
      */
     public static native int remove(String filename, long pool);
 
     /**
      * Destroy a shared memory segment and associated memory.
      * @param m The shared memory segment structure to destroy.
+     * @return the operation status
      */
     public static native int destroy(long m);
 
@@ -79,6 +81,7 @@ public class Shm {
      * @param pool the pool from which to allocate the shared memory
      *        structure for this process.
      * @return The created shared memory structure.
+     * @throws Error An error occurred
      */
     public static native long attach(String filename, long pool)
         throws Error;
@@ -87,6 +90,7 @@ public class Shm {
      * Detach from a shared memory segment without destroying it.
      * @param m The shared memory structure representing the segment
      *        to detach from.
+     * @return the operation status
      */
     public static native int detach(long m);
 
@@ -105,6 +109,7 @@ public class Shm {
      * Retrieve the length of a shared memory segment in bytes.
      * @param m The shared memory segment from which to retrieve
      *        the segment length.
+     * @return the length of the segment
      */
     public static native long size(long m);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Socket.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Socket.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Socket.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Socket.java Mon Jan 18 15:03:55 2016
@@ -109,6 +109,7 @@ public class Socket {
      * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).
      * @param cont The parent pool to use
      * @return The new socket that has been set up.
+     * @throws Exception Error creating socket
      */
     public static native long create(int family, int type,
                                      int protocol, long cont)
@@ -127,12 +128,14 @@ public class Socket {
      * APR_SHUTDOWN_WRITE        no longer allow write requests
      * APR_SHUTDOWN_READWRITE    no longer allow read or write requests
      * </PRE>
+     * @return the operation status
      */
     public static native int shutdown(long thesocket, int how);
 
     /**
      * Close a socket.
      * @param thesocket The socket to close
+     * @return the operation status
      */
     public static native int close(long thesocket);
 
@@ -148,6 +151,7 @@ public class Socket {
      * @param sa The socket address to bind to
      * This may be where we will find out if there is any other process
      *      using the selected port.
+     * @return the operation status
      */
     public static native int bind(long sock, long sa);
 
@@ -157,6 +161,7 @@ public class Socket {
      * @param backlog The number of outstanding connections allowed in the 
sockets
      *                listen queue.  If this value is less than zero, the 
listen
      *                queue size is set to zero.
+     * @return the operation status
      */
     public static native int listen(long sock, int backlog);
 
@@ -167,6 +172,7 @@ public class Socket {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception Socket accept error
      */
     public static native long acceptx(long sock, long pool)
         throws Exception;
@@ -177,6 +183,7 @@ public class Socket {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception Socket accept error
      */
     public static native long accept(long sock)
         throws Exception;
@@ -187,14 +194,15 @@ public class Socket {
      * @param name The accept filter
      * @param args Any extra args to the accept filter.  Passing NULL here 
removes
      *             the accept filter.
+     * @return the operation status
      */
     public static native int acceptfilter(long sock, String name, String args);
 
     /**
      * Query the specified socket if at the OOB/Urgent data mark
      * @param sock The socket to query
-     * @return True if socket is at the OOB/urgent mark,
-     *         otherwise return false.
+     * @return <code>true</code> if socket is at the OOB/urgent mark,
+     *         otherwise <code>false</code>.
      */
     public static native boolean atmark(long sock);
 
@@ -203,6 +211,7 @@ public class Socket {
      * or a different one.
      * @param sock The socket we wish to use for our side of the connection
      * @param sa The address of the machine we wish to connect to.
+     * @return the operation status
      */
     public static native int connect(long sock, long sa);
 
@@ -221,8 +230,7 @@ public class Socket {
      * @param buf The buffer which contains the data to be sent.
      * @param offset Offset in the byte buffer.
      * @param len The number of bytes to write; (-1) for full array.
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int send(long sock, byte[] buf, int offset, int len);
 
@@ -244,8 +252,7 @@ public class Socket {
      *               and no larger than buf.length
      * @param len The maximum number of buffers to be accessed; must be 
non-negative
      *            and no larger than buf.length - offset
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendb(long sock, ByteBuffer buf,
                                    int offset, int len);
@@ -267,14 +274,20 @@ public class Socket {
      *               and no larger than buf.length
      * @param len The maximum number of buffers to be accessed; must be 
non-negative
      *            and no larger than buf.length - offset
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendib(long sock, ByteBuffer buf,
                                     int offset, int len);
 
     /**
      * Send data over a network using internally set ByteBuffer
+     * @param sock The socket to send the data over.
+     * @param offset The offset within the buffer array of the first buffer 
from
+     *               which bytes are to be retrieved; must be non-negative
+     *               and no larger than buf.length
+     * @param len The maximum number of buffers to be accessed; must be 
non-negative
+     *            and no larger than buf.length - offset
+     * @return The number of bytes sent
      */
     public static native int sendbb(long sock,
                                    int offset, int len);
@@ -282,6 +295,13 @@ public class Socket {
     /**
      * Send data over a network using internally set ByteBuffer
      * without internal retry.
+     * @param sock The socket to send the data over.
+     * @param offset The offset within the buffer array of the first buffer 
from
+     *               which bytes are to be retrieved; must be non-negative
+     *               and no larger than buf.length
+     * @param len The maximum number of buffers to be accessed; must be 
non-negative
+     *            and no larger than buf.length - offset
+     * @return The number of bytes sent
      */
     public static native int sendibb(long sock,
                                      int offset, int len);
@@ -300,7 +320,7 @@ public class Socket {
      * </PRE>
      * @param sock The socket to send the data over.
      * @param vec The array from which to get the data to send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendv(long sock, byte[][] vec);
 
@@ -311,6 +331,7 @@ public class Socket {
      * @param buf  The data to send
      * @param offset Offset in the byte buffer.
      * @param len  The length of the data to send
+     * @return The number of bytes sent
      */
     public static native int sendto(long sock, long where, int flags,
                                     byte[] buf, int offset, int len);
@@ -385,9 +406,13 @@ public class Socket {
      */
     public static native int recvb(long sock, ByteBuffer buf,
                                    int offset, int nbytes);
+
     /**
      * Read data from a network using internally set ByteBuffer.
      *
+     * @param sock The socket to read the data from.
+     * @param offset Offset in the byte buffer.
+     * @param nbytes The number of bytes to read (-1) for full array.
      * @return If &gt; 0, the return value is the number of bytes read. If == 
0,
      *         the return value indicates EOF and if &lt; 0 the return value 
is the
      *         error code. Note a non-blocking read with no data current
@@ -420,6 +445,11 @@ public class Socket {
                                     int offset, int nbytes, long timeout);
     /**
      * Read data from a network with timeout using internally set ByteBuffer
+     * @param sock The socket to read the data from.
+     * @param offset Offset in the byte buffer.
+     * @param nbytes The number of bytes to read (-1) for full array.
+     * @param timeout The socket timeout in microseconds.
+     * @return the number of bytes received.
      */
     public static native int recvbbt(long sock,
                                      int offset, int nbytes, long timeout);
@@ -457,6 +487,7 @@ public class Socket {
      * APR_SO_RCVBUF     --  Set the ReceiveBufferSize
      * </PRE>
      * @param on Value for the option.
+     * @return the operation status
      */
     public static native int optSet(long sock, int opt, int on);
 
@@ -478,6 +509,7 @@ public class Socket {
      *                       (Currently only used on Windows)
      * </PRE>
      * @return Socket option returned on the call.
+     * @throws Exception An error occurred
      */
     public static native int optGet(long sock, int opt)
         throws Exception;
@@ -492,6 +524,7 @@ public class Socket {
      * t == 0 -- read and write calls never block
      * t &lt; 0  -- read and write calls block
      * </PRE>
+     * @return the operation status
      */
     public static native int timeoutSet(long sock, long t);
 
@@ -499,6 +532,7 @@ public class Socket {
      * Query socket timeout for the specified socket
      * @param sock The socket to query
      * @return Socket timeout returned from the query.
+     * @throws Exception An error occurred
      */
     public static native long timeoutGet(long sock)
         throws Exception;
@@ -522,7 +556,6 @@ public class Socket {
      * @param flags APR flags that are mapped to OS specific flags
      * @return Number of bytes actually sent, including headers,
      *         file, and trailers
-     *
      */
     public static native long sendfile(long sock, long file, byte [][] headers,
                                        byte[][] trailers, long offset,
@@ -530,6 +563,12 @@ public class Socket {
 
     /**
      * Send a file without header and trailer arrays.
+     * @param sock The socket to which we're writing
+     * @param file The open file from which to read
+     * @param offset Offset into the file where we should begin writing
+     * @param len Number of bytes to send from the file
+     * @param flags APR flags that are mapped to OS specific flags
+     * @return Number of bytes actually sent
      */
     public static native long sendfilen(long sock, long file, long offset,
                                         long len, int flags);
@@ -537,6 +576,8 @@ public class Socket {
     /**
      * Create a child pool from associated socket pool.
      * @param thesocket The socket to use
+     * @return a pointer to the pool
+     * @throws Exception An error occurred
      */
     public static native long pool(long thesocket)
         throws Exception;
@@ -578,14 +619,16 @@ public class Socket {
      * @param sock The currently open socket.
      * @param data The user data to associate with the socket.
      * @param key The key to associate with the data.
+     * @return the operation status
      */
       public static native int dataSet(long sock, String key, Object data);
 
     /**
      * Return the data associated with the current socket
-     * @param key The key to associate with the user data.
      * @param sock The currently open socket.
+     * @param key The key to associate with the user data.
      * @return Data or null in case of error.
      */
      public static native Object dataGet(long sock, String key);
+
 }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Status.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Status.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Status.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Status.java Mon Jan 18 15:03:55 2016
@@ -181,7 +181,7 @@ public class Status {
     public static final int ETIMEDOUT         = (APR_OS_START_USERERR + 5);
 
     private static native boolean is(int err, int idx);
-    /**
+    /*
      * APR_STATUS_IS Status Value Tests
      * <br><b>Warning :</b> For any particular error condition, more than one 
of these tests
      *      may match. This is because platform-specific error codes may not

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Stdlib.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Stdlib.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Stdlib.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Stdlib.java Mon Jan 18 15:03:55 2016
@@ -28,6 +28,7 @@ public class Stdlib {
      * @param dst Destination byte array
      * @param src Source memory address
      * @param sz Number of bytes to copy.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memread(byte [] dst, long src, int sz);
 
@@ -36,6 +37,7 @@ public class Stdlib {
      * @param dst Destination memory address
      * @param src Source byte array
      * @param sz Number of bytes to copy.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memwrite(long dst, byte [] src, int sz);
 
@@ -44,12 +46,14 @@ public class Stdlib {
      * @param dst Destination memory address
      * @param c Character to set.
      * @param sz Number of characters.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memset(long dst, int c, int sz);
 
     /**
      * Allocates memory blocks.
      * @param sz Bytes to allocate.
+     * @return a pointer
      */
     public static native long malloc(int sz);
 
@@ -57,6 +61,7 @@ public class Stdlib {
      * Reallocate memory blocks.
      * @param mem Pointer to previously allocated memory block.
      * @param sz New size in bytes.
+     * @return a pointer
      */
     public static native long realloc(long mem, int sz);
 
@@ -64,6 +69,7 @@ public class Stdlib {
      * Allocates an array in memory with elements initialized to 0.
      * @param num Number of elements.
      * @param sz Length in bytes of each element.
+     * @return a pointer
      */
     public static native long calloc(int num, int sz);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Thread.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Thread.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Thread.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Thread.java Mon Jan 18 15:03:55 2016
@@ -24,7 +24,7 @@ package org.apache.tomcat.jni;
 public class Thread {
 
     /**
-     * Get the current thread ID handle.
+     * @return the current thread ID handle.
      */
     public static native long current();
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Time.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Time.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Time.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Time.java Mon Jan 18 15:03:55 2016
@@ -28,13 +28,19 @@ public class Time {
     /** number of milliseconds per microsecond */
     public static final long APR_MSEC_PER_USEC = 1000L;
 
-    /** @return apr_time_t as a second */
+    /**
+     * @param t The time
+     * @return apr_time_t as a second
+     */
     public static long sec(long t)
     {
         return t / APR_USEC_PER_SEC;
     }
 
-    /** @return apr_time_t as a msec */
+    /**
+     * @param t The time
+     * @return apr_time_t as a msec
+     */
     public static long msec(long t)
     {
         return t / APR_MSEC_PER_USEC;
@@ -50,6 +56,7 @@ public class Time {
      * Formats dates in the RFC822
      * format in an efficient manner.
      * @param t the time to convert
+     * @return the formatted date
      */
     public static native String rfc822(long t);
 
@@ -59,6 +66,7 @@ public class Time {
      * Unlike ANSI/ISO C ctime(), apr_ctime() does not include
      * a \n at the end of the string.
      * @param t the time to convert
+     * @return the formatted date
      */
     public static native String ctime(long t);
 

Modified: tomcat/trunk/java/org/apache/tomcat/jni/User.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/User.java?rev=1725283&r1=1725282&r2=1725283&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/User.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/User.java Mon Jan 18 15:03:55 2016
@@ -28,6 +28,7 @@ public class User {
      * This function is available only if APR_HAS_USER is defined.
      * @param p The pool from which to allocate working space
      * @return Returns the user id
+     * @throws Error If an error occurred
      */
      public static native long uidCurrent(long p)
         throws Error;
@@ -37,6 +38,7 @@ public class User {
      * This function is available only if APR_HAS_USER is defined.
      * @param p The pool from which to allocate working space
      * @return Returns the group id
+     * @throws Error If an error occurred
      */
      public static native long gidCurrent(long p)
         throws Error;
@@ -48,6 +50,7 @@ public class User {
      * @param username The username to lookup
      * @param p The pool from which to allocate working space
      * @return Returns the user id
+     * @throws Error If an error occurred
      */
      public static native long uid(String username, long p)
         throws Error;
@@ -58,6 +61,7 @@ public class User {
      * @param username The username to lookup
      * @param p The pool from which to allocate working space
      * @return  Returns the user's group id
+     * @throws Error If an error occurred
      */
      public static native long usergid(String username, long p)
         throws Error;
@@ -68,6 +72,7 @@ public class User {
      * @param groupname The group name to look up
      * @param p The pool from which to allocate working space
      * @return  Returns the user's group id
+     * @throws Error If an error occurred
      */
      public static native long gid(String groupname, long p)
         throws Error;
@@ -78,6 +83,7 @@ public class User {
      * @param userid The userid
      * @param p The pool from which to allocate the string
      * @return New string containing user name
+     * @throws Error If an error occurred
      */
      public static native String username(long userid, long p)
         throws Error;
@@ -88,6 +94,7 @@ public class User {
      * @param groupid The groupid
      * @param p The pool from which to allocate the string
      * @return New string containing group name
+     * @throws Error If an error occurred
      */
      public static native String groupname(long groupid, long p)
         throws Error;
@@ -118,6 +125,7 @@ public class User {
      * @param username The named user
      * @param p The pool from which to allocate the string
      * @return New string containing directory name
+     * @throws Error If an error occurred
      */
      public static native String homepath(String username, long p)
         throws Error;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to