org.eclipse.net4j.connector
Enum ConnectorLocation

java.lang.Object
  extended by java.lang.Enum<ConnectorLocation>
      extended by org.eclipse.net4j.connector.ConnectorLocation
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ConnectorLocation>

public enum ConnectorLocation
extends java.lang.Enum<ConnectorLocation>

Enumerates the roles that an IConnector can play during the establishment of a physical connection.

An active connector that is created by a client application plays a CLIENT role and a passive connector that is created by an IAcceptor in response to a call to one of the active connector's connect methods plays a SERVER role.

Note however that the role of a connector is only meaningful to determine how a physical connection has been established. Once it has been established actual communication (opening IChannels, sending and receiving IBuffers) can occur in both directions without limitation. Values of this enumeration do not necessarily permit general assumption about whether a connector is located in a typical client or server environment.

See Also:
IConnector.connect(long), IConnector.connectAsync(), IConnector.openChannel(), IConnector.openChannel(IProtocol), IConnector.openChannel(String, Object), IChannel.sendBuffer(IBuffer), IChannel.setReceiveHandler(IBufferHandler)

Enum Constant Summary
CLIENT
           
SERVER
           
 
Method Summary
static ConnectorLocation valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ConnectorLocation[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLIENT

public static final ConnectorLocation CLIENT

SERVER

public static final ConnectorLocation SERVER
Method Detail

values

public static final ConnectorLocation[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ConnectorLocation c : ConnectorLocation.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ConnectorLocation 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

Copyright (c) 2004 - 2008 Eike Stepper, Germany.
All Rights Reserved.