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, sendRpc
availableBytes, getSocket, readPacket, writePacket
public MultiThreadedTcpRpcPacketHandler(TcpRpcSessionHandler handler, int sessId, RpcProcessor server, java.net.Socket socket, int maxRpcSize) throws java.io.IOException
handler
- TcpRpcSessionHandlersessId
- intserver
- RpcProcessorsocket
- SocketmaxRpcSize
- intjava.io.IOException
protected final MultiThreadedTcpRpcSessionHandler getSessionHandler()
protected RpcPacket allocateRpcPacket(int maxSize)
allocateRpcPacket
in class TcpRpcPacketHandler
maxSize
- intprotected void deallocateRpcPacket(RpcPacket pkt)
deallocateRpcPacket
in class TcpRpcPacketHandler
pkt
- RpcPacketprotected void processRpc(RpcPacket rpc) throws java.io.IOException
processRpc
in class TcpRpcPacketHandler
rpc
- RpcPacketjava.io.IOException
public void sendRpcResponse(RpcPacket rpc) throws java.io.IOException
sendRpcResponse
in interface RpcPacketHandler
rpc
- RpcPacketjava.io.IOException
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.