|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the address family encapsulated by this Acceptor's
associated ServerEndpointpublic interface Acceptor<T>
Passively initiates connections by listening on a ServerEndpoint
and asynchronously notifies an associated AcceptorListener of
each accepted connection.
Once an Acceptor is listening, it will continue to accept
incoming connections until its shutdown() method is called. An
Acceptor may not be reused once it has started listening or
been shut down.
| Method Summary | |
|---|---|
ServerEndpoint<T> |
getBoundEndpoint()
Returns the ServerEndpoint on which this Acceptor
is listening. |
ServerEndpoint<T> |
getEndpoint()
Returns the ServerEndpoint this Acceptor was
created with. |
void |
listen(AcceptorListener listener)
Passively accepts incoming connections on the associated ServerEndpoint. |
void |
shutdown()
Shuts down this Acceptor, releasing any resources in use. |
| Method Detail |
|---|
void listen(AcceptorListener listener)
throws IOException
ServerEndpoint. This call may block until listening
succeeds, but does not block to wait for incoming connections.
Each accepted connection will result in an asynchronous call to
newConnection on the given
listener.
listener - the listener that will be notified of new connections
IOException - if there was a problem listening on the
ServerEndpoint
IllegalStateException - if the Acceptor has been
shut down or is already listeningServerEndpoint<T> getEndpoint()
ServerEndpoint this Acceptor was
created with.
ServerEndpoint this Acceptor was
created withServerEndpoint<T> getBoundEndpoint()
ServerEndpoint on which this Acceptor
is listening.
ServerEndpoint on which this Acceptor
is listening
IllegalStateException - if the Acceptor has been shut
down or was not listeningvoid shutdown()
Acceptor, releasing any resources in use.
Once shutdown, an Acceptor cannot be restarted.
IllegalStateException - if the Acceptor has been
shut down or was not listening
|
Project Darkstar, Version 0.9.8.6 2013-07-29 20:32:23 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||