| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tomcat.jni.Poll
public class Poll
Poll
| Field Summary | |
|---|---|
| static int | APR_NO_DESCUsed in apr_pollfd_t to determine what the apr_descriptor is apr_datatype_e enum | 
| static int | APR_POLL_FILEdescriptor refers to a socket | 
| static int | APR_POLL_LASTDESCdescriptor refers to a file | 
| static int | APR_POLL_SOCKETnothing here | 
| static int | APR_POLLERRPending error | 
| static int | APR_POLLHUPHangup occurred | 
| static int | APR_POLLINCan read without blocking | 
| static int | APR_POLLNVALDescriptor invalid | 
| static int | APR_POLLOUTCan write without blocking | 
| static int | APR_POLLPRIPriority data available | 
| static int | APR_POLLSET_THREADSAFEAdding or Removing a Descriptor is thread safe | 
| Constructor Summary | |
|---|---|
| Poll() | |
| Method Summary | |
|---|---|
| static int | add(long pollset,
    long sock,
    int reqevents)Add a socket to a pollset with the default timeout. | 
| static int | addWithTimeout(long pollset,
               long sock,
               int reqevents,
               long timeout)Add a socket to a pollset with a specific timeout. | 
| static long | create(int size,
       long p,
       int flags,
       long ttl)Setup a pollset object. | 
| static int | destroy(long pollset)Destroy a pollset object | 
| static long | getTtl(long pollset)Get the socket time to live. | 
| static int | maintain(long pollset,
         long[] descriptors,
         boolean remove)Maintain on the descriptor(s) in a pollset | 
| static int | poll(long pollset,
     long timeout,
     long[] descriptors,
     boolean remove)Block for activity on the descriptor(s) in a pollset | 
| static int | pollset(long pollset,
        long[] descriptors)Return all descriptor(s) in a pollset | 
| static int | remove(long pollset,
       long sock)Remove a descriptor from a pollset | 
| static void | setTtl(long pollset,
       long ttl)Set the socket time to live. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int APR_POLLIN
public static final int APR_POLLPRI
public static final int APR_POLLOUT
public static final int APR_POLLERR
public static final int APR_POLLHUP
public static final int APR_POLLNVAL
public static final int APR_POLLSET_THREADSAFE
public static final int APR_NO_DESC
public static final int APR_POLL_SOCKET
public static final int APR_POLL_FILE
public static final int APR_POLL_LASTDESC
| Constructor Detail | 
|---|
public Poll()
| Method Detail | 
|---|
public static long create(int size,
                          long p,
                          int flags,
                          long ttl)
                   throws Error
size - The maximum number of descriptors that this pollset can holdp - The pool from which to allocate the pollsetflags - Optional flags to modify the operation of the pollset.ttl - Maximum time to live for a particular socket.
Errorpublic static int destroy(long pollset)
pollset - The pollset to destroy
public static int add(long pollset,
                      long sock,
                      int reqevents)
pollset - The pollset to which to add the socketsock - The sockets to addreqevents - requested events
public static int addWithTimeout(long pollset,
                                 long sock,
                                 int reqevents,
                                 long timeout)
pollset - The pollset to which to add the socketsock - The sockets to addreqevents - requested eventstimeout - requested timeout in microseconds (-1 for infinite)
public static int remove(long pollset,
                         long sock)
pollset - The pollset from which to remove the descriptorsock - The socket to remove
public static int poll(long pollset,
                       long timeout,
                       long[] descriptors,
                       boolean remove)
pollset - The pollset to usetimeout - Timeout in microsecondsdescriptors - Array of signaled descriptors (output parameter)
        The descriptor array must be two times the size of pollset.
        and are populated as follows:
 descriptors[2n + 0] -> returned events descriptors[2n + 1] -> socket
remove - Remove signaled descriptors from pollset
public static int maintain(long pollset,
                           long[] descriptors,
                           boolean remove)
pollset - The pollset to usedescriptors - Array of signaled descriptors (output parameter)
        The descriptor array must be the size of pollset.
        and are populated as follows:
 descriptors[n] -> socket
remove - Remove signaled descriptors from pollset
public static void setTtl(long pollset,
                          long ttl)
pollset - The pollset to usettl - Timeout in microsecondspublic static long getTtl(long pollset)
pollset - The pollset to use
public static int pollset(long pollset,
                          long[] descriptors)
pollset - The pollset to usedescriptors - Array of descriptors (output parameter)
        The descriptor array must be two times the size of pollset.
        and are populated as follows:
 descriptors[2n + 0] -> returned events descriptors[2n + 1] -> socket
| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||