Package org.eclipse.ecf.discovery

## Interface IContainerServiceInfoAdapter

    public interface IContainerServiceInfoAdapter

Adapter for IServiceInfo instances.

Since:
  3.0

### Field Summary

Fields
`static String` `CONTAINER_CONNECT_REQUIRES_PASSWORD`
`static String` `CONTAINER_CONNECT_TARGET`
`static String` `CONTAINER_CONNECT_TARGET_PATH`
`static String` `CONTAINER_CONNECT_TARGET_PROTOCOL`
`static String` `CONTAINER_FACTORY_NAME_PROPERTY` ECF Service Property Names

### Method Summary

All Methods Instance Methods Abstract Methods
`Boolean` `connectRequiresPassword()` Get whether the target requires password.
`String` `getConnectTarget()` Get the targetID for accessing the remote container.
`String` `getContainerFactoryName()` Get container name associated with this service info.
`void` `setContainerProperties​(String containerFactoryName, String connectTarget, Boolean connectRequiresPassword)` Set the container properties.
`void` `setContainerProperties​(String containerFactoryName, String connectProtocol, String connectPath, Boolean connectRequiresPassword)` Set the container properties.

### Field Detail

#### CONTAINER_FACTORY_NAME_PROPERTY

    static final String CONTAINER_FACTORY_NAME_PROPERTY

ECF Service Property Names

Since:
  3.0
See Also:
  Constant Field Values

#### CONTAINER_CONNECT_TARGET

    static final String CONTAINER_CONNECT_TARGET

Since:
  3.0
See Also:
  Constant Field Values

#### CONTAINER_CONNECT_TARGET_PROTOCOL

    static final String CONTAINER_CONNECT_TARGET_PROTOCOL

Since:
  3.0
See Also:
  Constant Field Values

#### CONTAINER_CONNECT_TARGET_PATH

    static final String CONTAINER_CONNECT_TARGET_PATH

Since:
  3.0
See Also:
  Constant Field Values

#### CONTAINER_CONNECT_REQUIRES_PASSWORD

    static final String CONTAINER_CONNECT_REQUIRES_PASSWORD

Since:
  3.0
See Also:
  Constant Field Values

### Method Detail

#### getContainerFactoryName

    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

    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

    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​(String containerFactoryName,
                                String connectProtocol,
                                String connectPath,
                                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​(String containerFactoryName,
                                String connectTarget,
                                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`.