Package com.perforce.p4java.server
Interface IServerAddress
- All Known Implementing Classes:
ServerAddress
public interface IServerAddress
Provides a specification for identifying a Perforce server as a resource in a
network. Usually, this means information needed for a Perforce client to
communicate with the Perforce server.
This specification has the familiarity of the standard Java URI. The protocol part specifies which network implementation to use and whether it is a secure (SSL) connection. The optional query string part can be used to set P4Java properties.
The P4Java URI syntax:
protocol://host:port?query
protocol = p4java|p4javassl|p4jrpc|p4jrpcssl|p4jrpcnts|p4jrpcntsssl
host = hostname|IP address
port = [0-9]* (values 0 to 65535)
query = string (i.e. key0=value0&key1=value1...)
p4java - default protocol (same as p4jrpc)
p4javassl - secure default protocol (same as p4jrpcssl)
p4jrpc - one-shot (connection-per-command) RPC protocol implementation.
p4jrpcssl - secure one-shot (connection-per-command) RPC protocol implementation.
p4jrpcnts - non-thread-safe (multiple-commands-per-connection) RPC protocol implementation.
p4jrpcntsssl - secure non-thread-safe (multiple-commands-per-connection) RPC protocol implementation.
p4jrsh - run p4d in 'rsh' mode.
P4Java URI Examples:
p4java://myp4server:1777
p4javassl://myp4server.xyz.com:1777?key0=value0&key1=value1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies the connection protocol -
Method Summary
Modifier and TypeMethodDescriptiongetHost()Gets the IP address or hostname of the server.intgetPort()Gets the port number of the server.Gets the properties parsed from the query component of the URI.Gets the connection protocol.getQuery()Gets the query component of the URI.getRsh()Gets the command for running the server in 'rsh' mode.getUri()Gets the URI form of the associated address.booleanisSecure()Return true, if the protocol is secure.
-
Method Details
-
isSecure
boolean isSecure()Return true, if the protocol is secure.- Returns:
- true/false
-
getUri
String getUri()Gets the URI form of the associated address.- Returns:
- the uri
-
getProtocol
IServerAddress.Protocol getProtocol()Gets the connection protocol.- Returns:
- the connection protocol
-
getHost
String getHost()Gets the IP address or hostname of the server.- Returns:
- the host
-
getPort
int getPort()Gets the port number of the server.- Returns:
- the port
-
getQuery
String getQuery()Gets the query component of the URI.- Returns:
- the query
-
getProperties
Properties getProperties()Gets the properties parsed from the query component of the URI.- Returns:
- the properties
-
getRsh
String getRsh()Gets the command for running the server in 'rsh' mode.- Returns:
- the rsh
-