package com.perforce.spark.connection; 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(String uri) { Properties props = System.getProperties(); // Identify ourselves in server log files. props.put(PropertyDefs.PROG_NAME_KEY, ConnectionConfig.getProduct()); props.put(PropertyDefs.PROG_VERSION_KEY, ConnectionConfig.getVersion()); // 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 IOptionsServer iserver = null; try { iserver = ServerFactory.getOptionsServer(uri, props); } catch (Exception e) { // return null } return iserver; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15801 | Paul Allen | Experimental copy of PAM. | ||
//guest/paul_allen/p4am/src/main/java/com/perforce/spark/connection/ConnectionFactory.java | |||||
#1 | 14228 | Paul Allen |
Moved View over to the new model. Retactor connection to package. |
||
//guest/paul_allen/p4am/src/main/java/com/perforce/spark/ConnectionFactory.java | |||||
#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 |