Interface MappingCommService<I1,​O1,​I2,​O2>

  • Type Parameters:
    I1 - The type of the skeleton communication pipe input.
    O1 - The type of the expected skeleton communication pipe output.
    I2 - The type of the stub communication pipe input.
    O2 - The type of the expected stub communication pipe output.
    All Superinterfaces:
    ADEPT2Service, CommunicationService<I1,​O1,​I2,​O2>

    public interface MappingCommService<I1,​O1,​I2,​O2>
    extends CommunicationService<I1,​O1,​I2,​O2>
    This interface extends the communication service by the means to add a host name mapping dynamically. A host name mapping allows the client to connect to a server using a different network connection than the server seems to use. For instance, a local forwarding may be used by configuring the client to map the server address to a local address. Or the server may not know its own address (e. g. when running in a dynamic container environment) but the client knows it and may then map the "wrong" address provided by the server to the physical one.

    This interface allows to set this mapping dynamically. Usually the global registry configured in the client already has the physical address. The "wrong" address used by the server can be retrieved from the URIs the exported services provide. By adding the dynamic mapping from these URIs to the address of the global registry will provide the appropriate host mapping without the need to configure it explicitly.

    • Method Detail

      • addDynamicHostMapping

        boolean addDynamicHostMapping​(ADEPT2Service stub)
        Adds one or several dynamic host mappings for the designated service stub, that is a mapping from each of the URIs claimed by the designated service (stub) to the actual remote identifier.
        A mapping will only be added if there is no explicit mapping for the authority of the claimed URIs of the designated service (stub). It will also not be added if there is a mapping for the host.
        Parameters:
        stub - The service stub providing the claimed URIs and the actual remote identifier.
        Returns:
        Whether at least one mapping has been added for the designated stub.
      • removeDynamicHostMapping

        boolean removeDynamicHostMapping​(ADEPT2Service stub)
        Removes all host mappings added dynamically for the designated service stub. Manually configured mappings for the claimed URIs of the designated stub will not be removed.
        Parameters:
        stub - The service stub providing the claimed URIs and the actual remote identifier.
        Returns:
        Whether at least one mapping has been removed for the designated stub.
        See Also:
        addDynamicHostMapping(ADEPT2Service)