Package one.nio.rpc
Class RpcSession<S,M>
java.lang.Object
one.nio.net.Session
one.nio.rpc.RpcSession<S,M>
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class one.nio.net.Session
Session.ArrayQueueItem, Session.QueueItem -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected static final intprotected intprotected static final byteprotected InetSocketAddressprotected booleanprotected intprotected longFields inherited from class one.nio.net.Session
ACTIVE, closing, CLOSING, EVENT_MASK, events, eventsToListen, IDLE, lastAccessTime, log, queueHead, READABLE, selector, slot, socket, SSL, STALE, wasSelected, WRITEABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidhandleRejectedExecution(RejectedExecutionException e, Object request) protected voidprotected booleanisAsyncRequest(Object request) protected Mprotected voidprocessRead(byte[] unusedBuffer) protected voidstreamCommunicate(StreamProxy streamProxy) protected intwriteResponse(Object response) Methods inherited from class one.nio.net.Session
checkStatus, close, getQueueStats, getRemoteHost, handleException, isSsl, lastAccessTime, listen, process, processWrite, read, readRaw, scheduleClose, socket, write, write, write
-
Field Details
-
BUFFER_SIZE
protected static final int BUFFER_SIZE- See Also:
-
HTTP_REQUEST_UID
protected static final byte HTTP_REQUEST_UID -
server
-
peer
-
proxyProtocol
protected boolean proxyProtocol -
buffer
protected byte[] buffer -
bytesRead
protected int bytesRead -
requestSize
protected int requestSize -
requestStartTime
protected long requestStartTime
-
-
Constructor Details
-
RpcSession
-
-
Method Details
-
processRead
- Overrides:
processReadin classSession- Throws:
Exception
-
isAsyncRequest
-
onRequestRead
-
writeResponse
- Throws:
IOException
-
streamCommunicate
- Throws:
IOException
-
invoke
- Throws:
Exception
-
handleDeserializationException
- Throws:
IOException
-
handleRejectedExecution
protected void handleRejectedExecution(RejectedExecutionException e, Object request) throws IOException - Throws:
IOException
-