Package com.perforce.p4java.server
Enum Class IServerAddress.Protocol
- All Implemented Interfaces:
Serializable,Comparable<IServerAddress.Protocol>,Constable
- Enclosing interface:
- IServerAddress
Specifies the connection protocol
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefault protocol (same as p4jrpc).Default SSL protocol (same as p4jrpcssl).One-shot (connection-per-command) RPC protocol.Non-thread-safe (multiple-commands-per-connection) RPC protocol.Non-thread-safe (multiple-commands-per-connection) SSL RPC protocol.One-shot (connection-per-command) SSL RPC protocol.RSH protocol (run p4d in 'rsh' mode).Non-thread-safe (multiple-commands-per-connection) RSH protocol (run p4d in 'rsh' mode). -
Method Summary
Modifier and TypeMethodDescriptionstatic IServerAddress.ProtocolfromString(String protocol) Returns the connection protocol as inferred from the passed-in value.booleanisRsh()Return true if the protocol is RSH.booleanisSecure()Return true if the protocol is secure.toString()Returns the string value representing the connection protocol for the server URI.static IServerAddress.ProtocolReturns the enum constant of this class with the specified name.static IServerAddress.Protocol[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
P4JAVA
Default protocol (same as p4jrpc). -
P4JAVASSL
Default SSL protocol (same as p4jrpcssl). -
P4JRPC
One-shot (connection-per-command) RPC protocol. -
P4JRPCSSL
One-shot (connection-per-command) SSL RPC protocol. -
P4JRPCNTS
Non-thread-safe (multiple-commands-per-connection) RPC protocol. -
P4JRPCNTSSSL
Non-thread-safe (multiple-commands-per-connection) SSL RPC protocol. -
P4JRSH
RSH protocol (run p4d in 'rsh' mode). -
P4JRSHNTS
Non-thread-safe (multiple-commands-per-connection) RSH protocol (run p4d in 'rsh' mode).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Returns the connection protocol as inferred from the passed-in value. If the value is null, or no such connection protocol can be inferred, returns null.- Parameters:
protocol- the string value of the connection protocol- Returns:
- the connection protocol
-
toString
Returns the string value representing the connection protocol for the server URI.- Overrides:
toStringin classEnum<IServerAddress.Protocol>- Returns:
- the string
-
isSecure
public boolean isSecure()Return true if the protocol is secure.We use a pattern
- Returns:
- true/false
-
isRsh
public boolean isRsh()Return true if the protocol is RSH.We use a pattern
- Returns:
- true/false
-