public class MultiThreadedTcpRpcPacketHandler extends TcpRpcPacketHandler implements RpcPacketHandler
Adds multi-threaded processing of RPC requests to the standard TCP RPC handler.
| Constructor and Description |
|---|
MultiThreadedTcpRpcPacketHandler(TcpRpcSessionHandler handler,
int sessId,
RpcProcessor server,
java.net.Socket socket,
int maxRpcSize)
Class constructor to create a TCP RPC handler for a server.
|
| Modifier and Type | Method and Description |
|---|---|
protected RpcPacket |
allocateRpcPacket(int maxSize)
Allocate an RPC packet from the packet pool
|
protected void |
deallocateRpcPacket(RpcPacket pkt)
Deallocate an RPC packet, return the packet to the pool.
|
protected MultiThreadedTcpRpcSessionHandler |
getSessionHandler()
Return the multi-threaded RPC session handler
|
protected void |
processRpc(RpcPacket rpc)
Process an RPC request by passing the request to a pool of worker threads.
|
void |
sendRpcResponse(RpcPacket rpc)
Send an RPC response using the TCP socket connection
|
closePacketHandler, getHandler, getMaximumRpcSize, getProtocolName, getSessionId, receiveRpc, receiveRpc, run, sendRpcavailableBytes, getSocket, readPacket, writePacketpublic MultiThreadedTcpRpcPacketHandler(TcpRpcSessionHandler handler, int sessId, RpcProcessor server, java.net.Socket socket, int maxRpcSize) throws java.io.IOException
handler - TcpRpcSessionHandlersessId - intserver - RpcProcessorsocket - SocketmaxRpcSize - intjava.io.IOExceptionprotected final MultiThreadedTcpRpcSessionHandler getSessionHandler()
protected RpcPacket allocateRpcPacket(int maxSize)
allocateRpcPacket in class TcpRpcPacketHandlermaxSize - intprotected void deallocateRpcPacket(RpcPacket pkt)
deallocateRpcPacket in class TcpRpcPacketHandlerpkt - RpcPacketprotected void processRpc(RpcPacket rpc) throws java.io.IOException
processRpc in class TcpRpcPacketHandlerrpc - RpcPacketjava.io.IOExceptionpublic void sendRpcResponse(RpcPacket rpc) throws java.io.IOException
sendRpcResponse in interface RpcPacketHandlerrpc - RpcPacketjava.io.IOExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.