package com.perforce.spark; import java.util.Properties; import com.perforce.p4java.PropertyDefs; import com.perforce.p4java.impl.mapbased.rpc.RpcPropertyDefs; import com.perforce.p4java.server.IOptionsServer; import com.perforce.p4java.server.ServerFactory; public class ConnectionFactory { public static IOptionsServer getConnection(ConnectionConfig config) throws Exception { Properties props = System.getProperties(); // Identify ourselves in server log files. props.put(PropertyDefs.PROG_NAME_KEY, "P4AM"); props.put(PropertyDefs.PROG_VERSION_KEY, "0.1"); // Allow p4 admin commands. props.put(RpcPropertyDefs.RPC_RELAX_CMD_NAME_CHECKS_NICK, "true"); // disable timeout for slow servers / large db lock times props.put(RpcPropertyDefs.RPC_SOCKET_SO_TIMEOUT_NICK, "0"); // Get a server connection String serverUri = config.toUri(); IOptionsServer iserver; iserver = ServerFactory.getOptionsServer(serverUri, props); return iserver; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 14228 | Paul Allen |
Moved View over to the new model. Retactor connection to package. |
||
#4 | 14047 | Paul Allen | Moved depot to list and added config. | ||
#3 | 13746 | Paul Allen | Basic File/Dir browsing and Cookie management. | ||
#2 | 13728 | Paul Allen | Error support | ||
#1 | 13720 | Paul Allen | Perforce Asset Manager (PAM or P4AM) -- ideas |