org.eclipse.ecf.discovery
Interface IContainerServiceInfoAdapter


public interface IContainerServiceInfoAdapter

Adapter for IServiceInfo instances.

Since:
3.0

Field Summary
static java.lang.String CONTAINER_CONNECT_REQUIRES_PASSWORD
           
static java.lang.String CONTAINER_CONNECT_TARGET
           
static java.lang.String CONTAINER_CONNECT_TARGET_PATH
           
static java.lang.String CONTAINER_CONNECT_TARGET_PROTOCOL
           
static java.lang.String CONTAINER_FACTORY_NAME_PROPERTY
          ECF Service Property Names
 
Method Summary
 java.lang.Boolean connectRequiresPassword()
          Get whether the target requires password.
 java.lang.String getConnectTarget()
          Get the targetID for accessing the remote container.
 java.lang.String getContainerFactoryName()
          Get container name associated with this service info.
 void setContainerProperties(java.lang.String containerFactoryName, java.lang.String connectTarget, java.lang.Boolean connectRequiresPassword)
          Set the container properties.
 void setContainerProperties(java.lang.String containerFactoryName, java.lang.String connectProtocol, java.lang.String connectPath, java.lang.Boolean connectRequiresPassword)
          Set the container properties.
 

Field Detail

CONTAINER_FACTORY_NAME_PROPERTY

static final java.lang.String CONTAINER_FACTORY_NAME_PROPERTY
ECF Service Property Names

Since:
3.0
See Also:
Constant Field Values

CONTAINER_CONNECT_TARGET

static final java.lang.String CONTAINER_CONNECT_TARGET
Since:
3.0
See Also:
Constant Field Values

CONTAINER_CONNECT_TARGET_PROTOCOL

static final java.lang.String CONTAINER_CONNECT_TARGET_PROTOCOL
Since:
3.0
See Also:
Constant Field Values

CONTAINER_CONNECT_TARGET_PATH

static final java.lang.String CONTAINER_CONNECT_TARGET_PATH
Since:
3.0
See Also:
Constant Field Values

CONTAINER_CONNECT_REQUIRES_PASSWORD

static final java.lang.String CONTAINER_CONNECT_REQUIRES_PASSWORD
Since:
3.0
See Also:
Constant Field Values
Method Detail

getContainerFactoryName

java.lang.String getContainerFactoryName()
Get container name associated with this service info.

Returns:
the container factory name. Will return null if no container factory name associated with this service info.

getConnectTarget

java.lang.String getConnectTarget()
Get the targetID for accessing the remote container. The String returned may be used to constuct a targetID for use in the IContainer.connect(targetID) call. For example:
 IContainer container = ContainerFactory.getDefault().createContainer(
                this.getContainerFactoryName());
 ID targetID = IDFactory.getDefault().createID(container.getConnectNamespace(),
                this.getConnectTarget());
 container.connect(targetID, null);
 

Returns:
String for use in connecting to the remote container. The returned value should be of proper syntax to be used to create a targetID for passing to IContainer.connect(org.eclipse.ecf.core.identity.ID, org.eclipse.ecf.core.security.IConnectContext) . May return null if there is incomplete/absent information for the info.

connectRequiresPassword

java.lang.Boolean connectRequiresPassword()
Get whether the target requires password.

Returns:
Boolean.TRUE if does require password, Boolean.FALSE if not, null if undefined.

setContainerProperties

void setContainerProperties(java.lang.String containerFactoryName,
                            java.lang.String connectProtocol,
                            java.lang.String connectPath,
                            java.lang.Boolean connectRequiresPassword)
Set the container properties. This method sets an implicit connect target. On the receiver, calls to getConnectTarget() will complete the URI in the following way
  <connectProtocol>://<IServiceInfo.getLocation().getAuthority()>/<connectPath>
 
See getConnectTarget().

Parameters:
containerFactoryName - set the containerFactoryName for this info. May not be null.
connectProtocol - set the connectProtocol for the target. May not be null.
connectPath - set the connect path for the target. May be null.
connectRequiresPassword - set whether the target requires a password. May be null.

setContainerProperties

void setContainerProperties(java.lang.String containerFactoryName,
                            java.lang.String connectTarget,
                            java.lang.Boolean connectRequiresPassword)
Set the container properties. This method sets an explicit connectTarget. The given connectTarget is assumed to be complete (e.g. ecftcp://user@host:port/path). See getConnectTarget().

Parameters:
containerFactoryName - set the containerFactoryName for this info. May not be null.
connectTarget - set the connectProtocol for the target. May not be null.
connectRequiresPassword - set whether the target requires a password. May be null.