|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.jeri.internal.mux.Mux
com.sun.jini.jeri.internal.mux.MuxServer
public class MuxServer
A MuxServer controls the server side of a multiplexed connection.
Field Summary | |
---|---|
private static Logger |
logger
mux logger |
private RequestDispatcher |
requestDispatcher
the request dispatcher to dispatch incoming requests to |
private SecurityContext |
securityContext
the security context to dispatch incoming requests in |
private static int |
serverInitialInboundRation
initial inbound ration as server, default is 32768 |
private static Executor |
userThreadPool
pool of threads for executing tasks with user code: used for dispatching incoming requests to request dispatchers |
Fields inherited from class com.sun.jini.jeri.internal.mux.Mux |
---|
Abort, Abort_partial, Acknowledgment, busySessions, CLIENT, ClientConnectionHeader_negotiate, Close, Data, Data_ackRequired, Data_close, Data_eof, Data_open, Error, IncrementRation, IncrementRation_shift, initialInboundRation, initialOutboundRation, MAX_REQUESTS, MAX_SESSION_ID, maxFragmentSize, muxDown, muxDownCause, muxDownMessage, muxLock, NoOperation, Ping, PingAck, role, SERVER, serverConnectionReady, sessions, Shutdown |
Constructor Summary | |
---|---|
MuxServer(OutputStream out,
InputStream in,
RequestDispatcher requestDispatcher)
Initiates the server side of a multiplexed connection over the given input/output stream pair. |
|
MuxServer(SocketChannel channel,
RequestDispatcher requestDispatcher)
|
Method Summary | |
---|---|
protected InvocationConstraints |
checkConstraints(InvocationConstraints constraints)
Checks that the specified requirements are either fully or partially satisfied by the constraints actually in force for this connection, and returns any constraints that must be fully or partially implemented by higher layers in order to fully satisfy all of the specified requirements. |
protected void |
checkPermissions()
Verifies that the calling context has all of the security permissions necessary to receive a request on this connection. |
private void |
dispatchNewRequest(int sessionID)
|
(package private) void |
handleOpen(int sessionID)
Handles message to open a new session over this connection. |
protected void |
populateContext(Collection context)
Populates the context collection with information representing this connection (such as the client host). |
void |
shutdown(String message)
Shuts down this multiplexed connection. |
boolean |
shutdownGracefully()
Shuts down this multiplexed connection only if there are no requests in progress (i.e. requests that have been dispatched to the request dispatcher but that have not been aborted or had their response fully written to the client). |
Methods inherited from class com.sun.jini.jeri.internal.mux.Mux |
---|
addSession, asyncSendAbort, asyncSendAcknowledgment, asyncSendClientConnectionHeader, asyncSendClose, asyncSendData, asyncSendError, asyncSendIncrementRation, asyncSendNoOperation, asyncSendPing, asyncSendPingAck, asyncSendServerConnectionHeader, asyncSendShutdown, directBuffersUseful, futureSendData, futureSendError, handleDown, processIncomingData, removeSession, setDown, setStartTimeout, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int serverInitialInboundRation
private static final Executor userThreadPool
private static final Logger logger
private final RequestDispatcher requestDispatcher
private final SecurityContext securityContext
Constructor Detail |
---|
public MuxServer(OutputStream out, InputStream in, RequestDispatcher requestDispatcher) throws IOException
out
- the output stream of the underlying connectionin
- the input stream of the underlying connectionrequestDispatcher
- the request dispatcher to dispatch
incoming requests received on this multiplexed connection to
IOException
public MuxServer(SocketChannel channel, RequestDispatcher requestDispatcher) throws IOException
IOException
Method Detail |
---|
public void shutdown(String message)
message
- reason for shutdown to be included in
IOExceptions thrown from future I/O operationspublic boolean shutdownGracefully()
protected void checkPermissions()
protected InvocationConstraints checkConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintException
protected void populateContext(Collection context)
void handleOpen(int sessionID) throws ProtocolException
handleOpen
in class Mux
ProtocolException
private void dispatchNewRequest(int sessionID) throws ProtocolException
ProtocolException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |