| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AcceptPolicy
A very simple accept policy interface.
 An instance of this interface may be associated with an instance
 of HttpRpcServer. After a new connection has
 been accepted, and before that connection is added to the underlying
 Selector the installed AcceptPolicy
 is consulted to check if the accepted connection should be retained.
 
If policy dictates that the connection not be retained it is closed immediately.
| Method Summary | |
|---|---|
|  boolean | shouldRetain(java.nio.channels.SocketChannel channel,
             int activeChannels)Consulted to determine whether or not the given SocketChannelshould be retained. | 
| Method Detail | 
|---|
boolean shouldRetain(java.nio.channels.SocketChannel channel,
                     int activeChannels)
SocketChannel should be retained.
 Implementations should avoid any calls on the channel that may block. Blocking the calling thread will have a significant impact on throughput on the server.
channel - The SocketChannel that has just been
        accepted.activeChannels - An (approximate) value indicating the number of
        active channels.
true if the channel should be retained,
        or false if it should be closed and
        discarded.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||