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 TypeMethodDescriptionvoidcheckServiceURI(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.getCallbackObjectIface(URI callbackUri) Gets the callback ID (name, which is also the interface of the callback object) the designated URI refers to.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.static StringgetHostnameCombined(String hostname, Integer port) 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.getServiceInstNames(URI serviceUri) Gets the component type name and the simple instance name of the service instance the designated URI refers to.
-
Method Details
-
createRemoteObjectIds
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
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
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, anIllegalArgumentExceptionwill be thrown.
-
getServiceInstName
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 andnullwill be returned. If logical host is disabled completely for this communication service, the network host will be checked, therefore in this case theBooleanwill never benull.- 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,
nullwill 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, anIllegalArgumentExceptionwill be thrown.
-
getServiceInstNames
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, anIllegalArgumentExceptionwill be thrown.
-
getCallbackObjectName
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 andnullwill be returned. If logical host is disabled completely for this communication service, the network host will be checked, therefore in this case theBooleanwill never benull.- 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,
nullwill 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, anIllegalArgumentExceptionwill be thrown.
-
getCallbackObjectIface
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, anIllegalArgumentExceptionwill be thrown.
-
getHostnameCombined
Gets the name of the designated host and port combined into one string. If the designated hostname isnull,nullwill be returned. If the designated port isnullor <0, the returned name will not contain a port.- Parameters:
hostname- The name of the host ornull.port- The port of the host ornull.- Returns:
- The name of the host combining the designated name and port or
null.
-