Interface IContainerServiceInfoAdapter


public interface IContainerServiceInfoAdapter
Adapter for IServiceInfo instances.
Since:
3.0
  • Field Details

  • Method Details

    • 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.