private static class EndpointBasedServer.ListenContextImpl extends Object implements ServerEndpoint.ListenContext
| Modifier and Type | Field and Description |
|---|---|
private ServerEndpoint.ListenHandle |
handle |
| Modifier | Constructor and Description |
|---|---|
private |
ListenContextImpl() |
| Modifier and Type | Method and Description |
|---|---|
ServerEndpoint.ListenCookie |
addListenEndpoint(ServerEndpoint.ListenEndpoint endpoint)
Adds
listenEndpoint to this
ListenContext's collection of
ListenEndpoint instances for the
ServerEndpoint it was passed to, starts a
listen operation on listenEndpoint if
necessary, and returns the ListenCookie for an
active listen operation on listenEndpoint. |
(package private) ServerEndpoint.ListenHandle |
getListenHandle() |
private ServerEndpoint.ListenHandle handle
public ServerEndpoint.ListenCookie addListenEndpoint(ServerEndpoint.ListenEndpoint endpoint) throws IOException
ServerEndpoint.ListenContextlistenEndpoint to this
ListenContext's collection of
ListenEndpoint instances for the
ServerEndpoint it was passed to, starts a
listen operation on listenEndpoint if
necessary, and returns the ListenCookie for an
active listen operation on listenEndpoint.
The returned ListenCookie must have been
obtained from a ListenHandle returned from
some invocation of ListenEndpoint.listen
on a ListenEndpoint equivalent to
listenEndpoint by Object.equals.
This method may start a new listen operation on
listenEndpoint by invoking its
listen method and returning the
ListenCookie from the resulting
ListenHandle, or it may return a
ListenCookie for a listen operation previously
started (but still active) on an equivalent
ListenEndpoint. If this method does invoke
listen on listenEndpoint and it
throws an exception, then this method throws that
exception.
The implementation of this method may invoke checkPermissions on listenEndpoint to verify
that a party that it is operating on behalf of has all of
the security permissions necessary to listen for requests
on listenEndpoint.
addListenEndpoint in interface ServerEndpoint.ListenContextendpoint - the ListenEndpoint to
add to this ListenContext and to return a
ListenCookie forListenCookie that represents an
active listen operation on listenEndpointIOException - if an invocation of listen
on listenEndpoint throws an
IOExceptionServerEndpoint.ListenHandle getListenHandle()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.