com.perforce.p4java.server
Interface IStreamingServer

All Superinterfaces:
IOptionsServer, IServer

public interface IStreamingServer
extends IOptionsServer


Method Summary
 void execStreamingMapCommand(String cmdName, String[] cmdArgs, Map<String,Object> inMap, IStreamingCallback callback, int key)
          Issue a streaming map command to the Perforce server, using an optional map for any input expected by the server (such as label or job specs, etc.).
 
Methods inherited from interface com.perforce.p4java.server.IOptionsServer
addTrust, addTrust, addTrust, changePassword, createDepot, createProtectionEntries, createStream, createTriggerEntries, createUser, createUserGroup, deleteBranchSpec, deleteClient, deleteDepot, deleteKey, deleteLabel, deletePendingChangelist, deleteProperty, deleteStream, deleteUser, deleteUserGroup, duplicateRevisions, execInputStringMapCmdList, execInputStringMapCmdList, execInputStringStreamCmd, execInputStringStreamingMapCmd, execMapCmdList, execMapCmdList, execQuietMapCmdList, execStreamCmd, fixJobs, getAuthTicket, getBranchSpec, getBranchSpecs, getChangelist, getChangelistDiffs, getChangelists, getClients, getClientTemplate, getCounter, getCounters, getCounters, getDepot, getDepotFiles, getDirectories, getDiskSpace, getErrorOrInfoStr, getErrorStr, getExportRecords, getExtendedFiles, getFileAnnotations, getFileContents, getFileDiffs, getFileDiffsStream, getFileSizes, getFixes, getInfoStr, getInterchanges, getInterchanges, getJobs, getKey, getKeys, getLabels, getLogTail, getMatchingLines, getMatchingLines, getOpenedFiles, getProperty, getProtectionEntries, getProtectionsTable, getReviewChangelists, getReviews, getRevisionHistory, getServerProcesses, getShelvedFiles, getStream, getStream, getStreamingExportRecords, getStreamIntegrationStatus, getStreams, getSubmittedIntegrations, getTicketsFilePath, getTriggerEntries, getTriggersTable, getTrust, getTrustFilePath, getTrusts, getTrusts, getUsageOptions, getUserGroups, getUsers, journalWait, login, login, login, logout, moveFile, obliterateFiles, reload, removeTrust, removeTrust, renameUser, searchJobs, setAuthTicket, setCounter, setFileAttributes, setFileAttributes, setKey, setProperty, setServerConfigurationValue, setTicketsFilePath, setTrustFilePath, setUsageOptions, showServerConfiguration, switchClientView, switchStreamView, tagFiles, unload, updateClient, updateClient, updateProtectionEntries, updateStream, updateTriggerEntries, updateUser, updateUserGroup, verifyFiles
 
Methods inherited from interface com.perforce.p4java.server.IServer
connect, createBranchSpec, createClient, createJob, createLabel, createUser, createUserGroup, deleteBranchSpec, deleteClient, deleteCounter, deleteJob, deleteLabel, deletePendingChangelist, deleteUser, deleteUserGroup, disconnect, execInputStringMapCmd, execInputStringStreamingMapComd, execMapCmd, execQuietMapCmd, execQuietStreamCmd, execStreamCmd, fixJobs, getAuthTicket, getBranchSpec, getBranchSpecs, getChangelist, getChangelistDiffs, getChangelistDiffsStream, getChangelistFiles, getChangelists, getChangelists, getCharsetName, getClient, getClient, getClients, getClientTemplate, getClientTemplate, getCounter, getCounters, getCurrentClient, getDbSchema, getDepotFiles, getDepots, getDirectories, getExportRecords, getExtendedFiles, getFileAnnotations, getFileContents, getFileDiffs, getFixList, getInterchanges, getInterchanges, getJob, getJobs, getJobSpec, getKnownCharsets, getLabel, getLabels, getLoginStatus, getOpenedFiles, getProperties, getProtectionEntries, getReviews, getRevisionHistory, getServerFileDiffs, getServerInfo, getServerProcesses, getServerVersionNumber, getStatus, getSubmittedIntegrations, getUser, getUserGroup, getUserGroups, getUserName, getUsers, getWorkingDirectory, isCaseSensitive, isConnected, login, login, logout, moveFile, registerCallback, registerProgressCallback, registerSSOCallback, setAuthTicket, setCharsetName, setCounter, setCurrentClient, setUserName, setWorkingDirectory, supportsSmartMove, supportsUnicode, tagFiles, updateBranchSpec, updateClient, updateJob, updateLabel, updateUser, updateUserGroup
 

Method Detail

execStreamingMapCommand

void execStreamingMapCommand(String cmdName,
                             String[] cmdArgs,
                             Map<String,Object> inMap,
                             IStreamingCallback callback,
                             int key)
                             throws P4JavaException
Description copied from interface: IServer
Issue a streaming map command to the Perforce server, using an optional map for any input expected by the server (such as label or job specs, etc.).

Streaming commands allow users to get each result from a suitably-issued command as it comes in from the server, rather than waiting for the entire command method to complete (and getting the results back as a completed List or Map or whatever).

The results are sent to the user using the IStreamingCallback handleResult method; see the IStreamingCallback Javadoc for details. The payload passed to handleResult is usually the raw map gathered together deep in the RPC protocol layer, and the user is assumed to have the knowledge and technology to be able to parse it and use it suitably in much the same way as a user unpacks or processes the results from the other low-level exec methods like execMapCommand.

NOTE: 'streaming' here has nothing at all to do with Perforce 'streams', which are (or will be) implemented elsewhere.

Specified by:
execStreamingMapCommand in interface IServer
Parameters:
cmdName - the command to be issued; must be non-null, and correspond to a Perforce command recognized by P4Java and defined in CmdSpec.
cmdArgs - the array of command arguments (options and file arguments, etc.) to be sent to the Perforce server. These must be in the form used by the corresponding p4 command line interpreter. Ignored if null.
inMap - an optional map to be sent to the server as standard input, using the Python map format (-G) form. You must remember to issue the relevant command-specific option to enable this if needed.
callback - a non-null IStreamingCallback to be used to process the incoming results.
key - an opaque integer key that is passed to the IStreamingCallback callback methods to identify the action as being associated with this specific call.
Throws:
P4JavaException - if an error occurs processing this method and its parameters.


Copyright © 2015 Perforce Software. All Rights Reserved.