public class RpcPacketDispatcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RpcPacketDispatcher.RpcPacketDispatcherMode
Specifies the mode the dispatcher's currently running in.
|
static class |
RpcPacketDispatcher.RpcPacketDispatcherResult
An enum used by subsidiary function and packet dispatchers to
tell this level of dispatcher what to do.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRACE_PREFIX |
Constructor and Description |
---|
RpcPacketDispatcher(java.util.Properties props,
RpcServer server) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
dispatch(CommandEnv cmdEnv)
Top-level dispatcher method.
|
FlowControl |
getFlowController() |
protected void |
setFlowController(FlowControl flowController) |
void |
shutdown(RpcConnection rpcConnection)
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.
|
public static final java.lang.String TRACE_PREFIX
public RpcPacketDispatcher(java.util.Properties props, RpcServer server)
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> dispatch(CommandEnv cmdEnv) throws ConnectionException, AccessException
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.
cmdEnv
- cmdEnvConnectionException
- on errorAccessException
- on errorpublic void shutdown(RpcConnection rpcConnection) throws ConnectionException
rpcConnection
- rpcConnectionConnectionException
- on errorpublic FlowControl getFlowController()
protected void setFlowController(FlowControl flowController)