com.perforce.p4java.impl.mapbased.rpc.packet
Class RpcPacketDispatcher
java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.packet.RpcPacketDispatcher
public class RpcPacketDispatcher
- extends Object
Top-level client-side packet dispatcher. Responsible for dispatching
packets (and their contents) to the correct processor classes or
methods as the packets come in from the server. Also responsible for
flow control and sundry other things as explained below. There is
one RpcPacketDispatcher object for each RpcServer object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRACE_PREFIX
public static final String TRACE_PREFIX
- See Also:
- Constant Field Values
RpcPacketDispatcher
public RpcPacketDispatcher(Properties props,
RpcServer server)
dispatch
public List<Map<String,Object>> dispatch(CommandEnv cmdEnv)
throws ConnectionException,
AccessException
- Top-level dispatcher method.
Dispatch (i.e. process) commands sent from the Perforce server in
response to the original user command. This is an arbitrarily complex
process, and may or may not involve traffic management, etc., so
the implementation here may be less than transparent...
This method only returns when the entire original command was finished;
basically, if it returns at all, things went well; otherwise it throws
a suitable exception. Extensive work is actually passed off to the
various sub dispatchers, which may do their own client / server messaging.
- Throws:
ConnectionException
AccessException
shutdown
public void shutdown(RpcConnection rpcConnection)
throws ConnectionException
- Attempt to cleanly shut down the dispatcher; this should involve
sending a release2 packet, but this is not always possible, and
we suppress any resulting errors.
- Throws:
ConnectionException
getFlowController
public FlowControl getFlowController()
setFlowController
protected void setFlowController(FlowControl flowController)
Copyright © 2015 Perforce Software. All Rights Reserved.