Package com.perforce.p4java.server
Enum IServerAddress.Protocol
- java.lang.Object
-
- java.lang.Enum<IServerAddress.Protocol>
-
- com.perforce.p4java.server.IServerAddress.Protocol
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IServerAddress.Protocol>
- Enclosing interface:
- IServerAddress
public static enum IServerAddress.Protocol extends java.lang.Enum<IServerAddress.Protocol>
Specifies the connection protocol
-
-
Enum Constant Summary
Enum Constants Enum Constant Description P4JAVA
Default protocol (same as p4jrpc).P4JAVASSL
Default SSL protocol (same as p4jrpcssl).P4JRPC
One-shot (connection-per-command) RPC protocol.P4JRPCNTS
Non-thread-safe (multiple-commands-per-connection) RPC protocol.P4JRPCNTSSSL
Non-thread-safe (multiple-commands-per-connection) SSL RPC protocol.P4JRPCSSL
One-shot (connection-per-command) 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IServerAddress.Protocol
fromString(java.lang.String protocol)
Returns the connection protocol as inferred from the passed-in value.boolean
isRsh()
Return true if the protocol is RSH.boolean
isSecure()
Return true if the protocol is secure.java.lang.String
toString()
Returns the string value representing the connection protocol for the server URI.static IServerAddress.Protocol
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static IServerAddress.Protocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
P4JAVA
public static final IServerAddress.Protocol P4JAVA
Default protocol (same as p4jrpc).
-
P4JAVASSL
public static final IServerAddress.Protocol P4JAVASSL
Default SSL protocol (same as p4jrpcssl).
-
P4JRPC
public static final IServerAddress.Protocol P4JRPC
One-shot (connection-per-command) RPC protocol.
-
P4JRPCSSL
public static final IServerAddress.Protocol P4JRPCSSL
One-shot (connection-per-command) SSL RPC protocol.
-
P4JRPCNTS
public static final IServerAddress.Protocol P4JRPCNTS
Non-thread-safe (multiple-commands-per-connection) RPC protocol.
-
P4JRPCNTSSSL
public static final IServerAddress.Protocol P4JRPCNTSSSL
Non-thread-safe (multiple-commands-per-connection) SSL RPC protocol.
-
P4JRSH
public static final IServerAddress.Protocol P4JRSH
RSH protocol (run p4d in 'rsh' mode).
-
P4JRSHNTS
public static final IServerAddress.Protocol P4JRSHNTS
Non-thread-safe (multiple-commands-per-connection) RSH protocol (run p4d in 'rsh' mode).
-
-
Method Detail
-
values
public static IServerAddress.Protocol[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IServerAddress.Protocol c : IServerAddress.Protocol.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IServerAddress.Protocol valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromString
public static IServerAddress.Protocol fromString(java.lang.String protocol)
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
public java.lang.String toString()
Returns the string value representing the connection protocol for the server URI.- Overrides:
toString
in classjava.lang.Enum<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
-
-