Interface ADEPT2RemoteObjectIdentifierFactory


public interface ADEPT2RemoteObjectIdentifierFactory
This factory is responsible to create remote object identifiers and callback object identifiers valid for the communication service this factory is assigned to.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkServiceURI(URI serviceURI)
    Validates whether the designated URI is well-formed and may identify a service instance.
    createCallbackIds(Class<?> callbackIface)
    Creates a URI as remote object identifier and a name for a callback object of the designated type.
    createRemoteObjectIds(String serviceType, String serviceInst)
    Creates a URI and a service name with which to export and register the designated designated ADEPT2 service.
    Gets the callback ID (name, which is also the interface of the callback object) the designated URI refers to.
    Gets the callback ID (name and count) as path of the callback object the designated URI refers to and whether the URI refers to the logical host of this host or not.
    static String
    Gets the name of the designated host and port combined into one string.
    getServiceInstName(URI serviceUri)
    Gets the hierarchical name of the service instance the designated URI refers to and whether the URI refers to the logical host of this host or not.
    Gets the component type name and the simple instance name of the service instance the designated URI refers to.
  • Method Details

    • createRemoteObjectIds

      Pair<URI,String> createRemoteObjectIds(String serviceType, String serviceInst)
      Creates a URI and a service name with which to export and register the designated designated ADEPT2 service.
      Parameters:
      serviceType - The type of the requested ADEPT2 service as it is known to the ADEPT2 registry.
      serviceInst - The name of the service instance as it is known to the ADEPT2 registry.
      Returns:
      A URI as remote object identifier and a name for the designated ADEPT2 service.
    • createCallbackIds

      Pair<URI,String> createCallbackIds(Class<?> callbackIface)
      Creates a URI as remote object identifier and a name for a callback object of the designated type.
      Parameters:
      callbackIface - The type of the callback object to identify.
      Returns:
      A URI as remote object identifier and a name for a callback object of the designated type.
    • checkServiceURI

      void checkServiceURI(URI serviceURI)
      Validates whether the designated URI is well-formed and may identify a service instance.
      Parameters:
      serviceURI - The URI to check for validity.
      Throws:
      IllegalArgumentException - If the service URI is invalid, an IllegalArgumentException will be thrown.
    • getServiceInstName

      Pair<String,Boolean> getServiceInstName(URI serviceUri)
      Gets the hierarchical name of the service instance the designated URI refers to and whether the URI refers to the logical host of this host or not. If the URI does not contain a logical host, this cannot be decided and null will be returned. If logical host is disabled completely for this communication service, the network host will be checked, therefore in this case the Boolean will never be null.
      Parameters:
      serviceUri - The URI of the service called remotely.
      Returns:
      The hierarchical name of the service instance the designated URI refers to and whether the URI refers to the logical host of this host or not. If it does not contain a logical host, null will be returned unless logical host is disabled for this communication service which will compare the network hosts.
      Throws:
      IllegalArgumentException - If the designated URI is invalid for this communication service or does not refer to a service URI, an IllegalArgumentException will be thrown.
    • getServiceInstNames

      Pair<String,String> getServiceInstNames(URI serviceUri)
      Gets the component type name and the simple instance name of the service instance the designated URI refers to.
      Parameters:
      serviceUri - The URI of the service called remotely.
      Returns:
      The component type name and the simple instance name of the service instance the designated URI refers to.
      Throws:
      IllegalArgumentException - If the designated URI is invalid for this communication service or does not refer to a service URI, an IllegalArgumentException will be thrown.
    • getCallbackObjectName

      Pair<String,Boolean> getCallbackObjectName(URI callbackUri)
      Gets the callback ID (name and count) as path of the callback object the designated URI refers to and whether the URI refers to the logical host of this host or not. If the URI does not contain a logical host, this cannot be decided and null will be returned. If logical host is disabled completely for this communication service, the network host will be checked, therefore in this case the Boolean will never be null.
      Parameters:
      callbackUri - The URI of the callback object.
      Returns:
      The callback ID (name and count) as path of the callback object the designated URI refers to and whether the URI refers to the logical host of this host or not. If it does not contain a logical host, null will be returned unless logical host is disabled for this communication service which will compare the network hosts.
      Throws:
      IllegalArgumentException - If the designated URI is invalid for this communication service or does not refer to a callback object, an IllegalArgumentException will be thrown.
    • getCallbackObjectIface

      String getCallbackObjectIface(URI callbackUri)
      Gets the callback ID (name, which is also the interface of the callback object) the designated URI refers to.
      Parameters:
      callbackUri - The URI of the callback object.
      Returns:
      The callback ID (name, which is also the interface of the callback object) the designated URI refers to.
      Throws:
      IllegalArgumentException - If the designated URI is invalid for this communication service or does not refer to a callback object, an IllegalArgumentException will be thrown.
    • getHostnameCombined

      static String getHostnameCombined(String hostname, Integer port)
      Gets the name of the designated host and port combined into one string. If the designated hostname is null, null will be returned. If the designated port is null or <0, the returned name will not contain a port.
      Parameters:
      hostname - The name of the host or null.
      port - The port of the host or null.
      Returns:
      The name of the host combining the designated name and port or null.