Class CommandEnv


  • public class CommandEnv
    extends java.lang.Object
    Used to package up the Perforce function environment for a single Perforce command across multiple RPC function calls.

    In particular, we need to keep things like file handles, arbitrary RPC function arguments, etc., around for use during complex long-running commands that span many dispatch calls in loop or duplex mode, etc., in response to single user commands like 'sync'.

    Note that this is in distinction to a) the command's external environment (in the ExternalEnv class), and b) the command's individual function environments,

    • Field Detail

      • MAX_HANDLERS

        public static final int MAX_HANDLERS
        Max number of live handlers per command cycle. Value copied straight from the C++ API.
        See Also:
        Constant Field Values
      • LINE_SEPARATOR

        public static final java.lang.String LINE_SEPARATOR
        Sequence used by operating system to separate lines in text files. Default to "\n" if it is not available.
    • Constructor Detail

    • Method Detail

      • handleResult

        public void handleResult​(java.util.Map<java.lang.String,​java.lang.Object> resultMap)
        Handle a result by either adding it to the resultsMapVec for later processing or passing it up to the streaming results callback handler.
        Parameters:
        resultMap - resultMap
      • handlePartialResult

        public void handlePartialResult​(java.util.Map<java.lang.String,​java.lang.Object> resultMap)
        Handle a partial result by either adding it to the resultsMapVec for later processing or passing it up to the streaming results callback handler.
        Parameters:
        resultMap - resultMap
      • resetPartialResult

        public void resetPartialResult()
      • setCmdSpec

        public void setCmdSpec​(RpcCmdSpec cmdSpec)
      • getResultMaps

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getResultMaps()
      • setResultMaps

        public void setResultMaps​(java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> resultMaps)
      • clearLastResultMap

        public void clearLastResultMap()
      • getStateMap

        public java.util.Map<java.lang.String,​java.lang.Object> getStateMap()
      • setStateMap

        public void setStateMap​(java.util.Map<java.lang.String,​java.lang.Object> stateMap)
      • getServerProtocolLevel

        public int getServerProtocolLevel()
      • setProtocolSpecs

        public void setProtocolSpecs​(ProtocolCommand protocolSpecs)
      • setRpcConnection

        public void setRpcConnection​(RpcConnection rpcConnection)
      • newHandler

        public void newHandler()
      • getServerProtocolSpecsMap

        public java.util.Map<java.lang.String,​java.lang.Object> getServerProtocolSpecsMap()
      • setServerProtocolSpecsMap

        public void setServerProtocolSpecsMap​(java.util.Map<java.lang.String,​java.lang.Object> serverProtocolSpecsMap)
      • setProgressCallback

        public void setProgressCallback​(IProgressCallback progressCallback)
      • getCmdCallBackKey

        public int getCmdCallBackKey()
      • setCmdCallBackKey

        public void setCmdCallBackKey​(int cmdCallBackKey)
      • isUserCanceled

        public boolean isUserCanceled()
      • setUserCanceled

        public void setUserCanceled​(boolean userCanceled)
      • isSyncInPlace

        public boolean isSyncInPlace()
      • setSyncInPlace

        public void setSyncInPlace​(boolean syncInPlace)
      • setStreamingCallback

        public void setStreamingCallback​(IStreamingCallback streamingCallback)
      • getStreamingCallbackKey

        public int getStreamingCallbackKey()
      • setStreamingCallbackKey

        public void setStreamingCallbackKey​(int streamingCallbackKey)
      • isNonCheckedSyncs

        public boolean isNonCheckedSyncs()
      • setNonCheckedSyncs

        public void setNonCheckedSyncs​(boolean nonCheckedSyncs)
      • isDontWriteTicket

        public boolean isDontWriteTicket()
      • setDontWriteTicket

        public void setDontWriteTicket​(boolean dontWriteTicket)
      • isStreamCmd

        public boolean isStreamCmd()
      • setStreamCmd

        public void setStreamCmd​(boolean streamCmd)
      • setFilterCallback

        public void setFilterCallback​(IFilterCallback filterCallback)
      • setParallelCallback

        public void setParallelCallback​(IParallelCallback parallelCallback)
      • getSyncTime

        public long getSyncTime()
      • setSyncTime

        public void setSyncTime​(long syncTime)
      • isNullSync

        public boolean isNullSync()
      • setNullSync

        public void setNullSync​(boolean nullSync)
      • isBufferOutput

        public boolean isBufferOutput()
      • setBufferOutput

        public void setBufferOutput​(boolean bufferOutput)