Enum ConnectorState
- java.lang.Object
- 
- java.lang.Enum<ConnectorState>
- 
- org.eclipse.net4j.connector.ConnectorState
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<ConnectorState>
 
 public enum ConnectorState extends java.lang.Enum<ConnectorState> Enumerates the lifecycle states of anIConnector.- Author:
- Eike Stepper
- See Also:
- IConnector.getState()
- No Extend
- This interface is not intended to be extended by clients.
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description CONNECTEDIndicates that theIConnectorhas successfully managed to establish and negotiate the underlying physical connection and is ready now to perform actual communications.CONNECTINGIndicates that theIConnectoris currently trying to establish an underlying physical connection like a TCP socket connection.DISCONNECTEDIndicates that theIConnectorhas not been connected yet or has been disconnected after being connected previously.NEGOTIATINGIndicates that theIConnectorhas successfully managed to establish the underlying physical connection and has currently delegated control over this connection to anINegotiator.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static ConnectorStatevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ConnectorState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
DISCONNECTEDpublic static final ConnectorState DISCONNECTED Indicates that theIConnectorhas not been connected yet or has been disconnected after being connected previously.A connector is DISCONNECTEDif and only if it is notactive. A transition toCONNECTINGcan be triggered by callingIConnector.connect(long)orIConnector.connectAsync().- See Also:
- IConnector.getState(),- ILifecycle.isActive()
 
 - 
CONNECTINGpublic static final ConnectorState CONNECTING Indicates that theIConnectoris currently trying to establish an underlying physical connection like a TCP socket connection.A connector can only be CONNECTINGif it isactive. As soon as the underlying physical connection is successfully established the state of the connector automatically transitions toNEGOTIATING.- See Also:
- IConnector.getState(),- ILifecycle.isActive()
 
 - 
NEGOTIATINGpublic static final ConnectorState NEGOTIATING Indicates that theIConnectorhas successfully managed to establish the underlying physical connection and has currently delegated control over this connection to anINegotiator.A connector can only be NEGOTIATINGif it isactiveand a negotiator has been supplied. As soon as the negotiator has successfully negotiated both peers (or a negotiator has not been supplied) the state of the connector automatically transitions toCONNECTED.Negotiators can implement arbitrary handshake protocols, challenge-response sequences or other authentication procedures. They can also be used to initially setup connection encryption if the connector implementation is not able to do so. - See Also:
- IConnector.getState(),- ILifecycle.isActive()
 
 - 
CONNECTEDpublic static final ConnectorState CONNECTED Indicates that theIConnectorhas successfully managed to establish and negotiate the underlying physical connection and is ready now to perform actual communications.A connector can only be CONNECTEDif it isactive. A transition toDISCONNECTEDcan be triggered by callingCloseable.close().- See Also:
- IConnector.getState(),- ILifecycle.isActive()
 
 
- 
 - 
Method Detail- 
valuespublic static ConnectorState[] 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 (ConnectorState c : ConnectorState.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static ConnectorState 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 name
- java.lang.NullPointerException- if the argument is null
 
 
- 
 
-