com.perforce.p4java.impl.mapbased.rpc.func.client
Class ClientFunctionDispatcher

java.lang.Object
  extended by com.perforce.p4java.impl.mapbased.rpc.func.client.ClientFunctionDispatcher

public class ClientFunctionDispatcher
extends Object

Dispatch incoming client functions from the server. This may involve a great deal of work under the covers, including some extended series of calls back to the server and / or complex flow control management, or it may involve little more than returning what's already been seen.


Field Summary
protected  RpcServer server
           
static String TRACE_PREFIX
           
 
Constructor Summary
ClientFunctionDispatcher(RpcPacketDispatcher mainDispatcher, Properties props, RpcServer server)
           
 
Method Summary
protected  Map<String,Object> convertFileDataMap(Map<String,Object> map, Charset charset, boolean isUnicodeServer)
           
 RpcPacketDispatcher.RpcPacketDispatcherResult dispatch(RpcPacketDispatcher.RpcPacketDispatcherMode dispatchMode, RpcFunctionSpec funcSpec, CommandEnv cmdEnv, Map<String,Object> resultsMap)
           
protected  boolean reportClientProgress(IProgressCallback progressCallback, int cmdCallBackKey, RpcFunctionSpec funcSpec, CommandEnv cmdEnv, Map<String,Object> resultsMap)
          Do a quick and dirty probabilistic progress report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_PREFIX

public static final String TRACE_PREFIX
See Also:
Constant Field Values

server

protected RpcServer server
Constructor Detail

ClientFunctionDispatcher

public ClientFunctionDispatcher(RpcPacketDispatcher mainDispatcher,
                                Properties props,
                                RpcServer server)
Method Detail

dispatch

public RpcPacketDispatcher.RpcPacketDispatcherResult dispatch(RpcPacketDispatcher.RpcPacketDispatcherMode dispatchMode,
                                                              RpcFunctionSpec funcSpec,
                                                              CommandEnv cmdEnv,
                                                              Map<String,Object> resultsMap)
                                                       throws ConnectionException
Throws:
ConnectionException

convertFileDataMap

protected Map<String,Object> convertFileDataMap(Map<String,Object> map,
                                                Charset charset,
                                                boolean isUnicodeServer)

reportClientProgress

protected boolean reportClientProgress(IProgressCallback progressCallback,
                                       int cmdCallBackKey,
                                       RpcFunctionSpec funcSpec,
                                       CommandEnv cmdEnv,
                                       Map<String,Object> resultsMap)
Do a quick and dirty probabilistic progress report. Does not try to be too clever, but it does need to know something about the calling context to be able to send something useful back. If the tick() callback is called, this will return whatever the tick call returned, otherwise it returns true (which is usually interpreted to mean "keep going"...



Copyright © 2011 Perforce Software. All Rights Reserved.