public interface ServiceAccess extends ModelViewerProvider, NameResolution
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getConfiguredPlugin(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType)
Retrieves the default plugin of the designated type which is configured for
the designated (using) instance.
|
<T> T |
getConfiguredPlugin(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType,
java.lang.String pluginInstanceName)
Retrieves the plugin having the designated type and instance name as well
as type and which is configured for the designated (using) instance.
|
<T> java.util.Map<java.lang.String,T> |
getConfiguredPlugins(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType)
Retrieves all plugin instances (pre-configured and dynamic) of the
designated plugin type.
|
java.lang.Class<?> |
getInterfaceForComponentType(java.lang.String componentType)
Returns the class object of the corresponding interface / superclass, if
the component type is declared.
|
<T> T |
getModelFactory(java.lang.String modelFactoryName,
java.lang.Class<T> modelFactoryType)
Gets the designated model factory registry.
|
<T extends ADEPT2Service> |
getService(SessionToken session,
java.lang.String serviceName,
java.lang.Class<T> serviceType)
Returns the designated service which is either a local service or a service
stub that is retrieved from the global registry if the service is not known
to this registry but to the global registry.
|
<T extends ADEPT2Service> |
getService(SessionToken session,
java.net.URI[] serviceURIs,
java.lang.Class<T> serviceType)
Retrieves the service described by the URIs which is either a local service
stub that is retrieved from the global registry if the service is not known
to this registry but to the global registry.
|
<T extends ADEPT2Service> |
getServiceOfType(SessionToken session,
java.lang.String serviceTypeName,
java.lang.Class<T> serviceType)
Returns the service instance of the designated service type which is
configured for usage by this (the requesting) service instance.
|
getModelViewerClassgetComponentType, getFormattedSignature, getHierarchicalInstanceName, getSimpleInstanceNamejava.lang.Class<?> getInterfaceForComponentType(java.lang.String componentType)
throws ConfigurationException
ConfigurationException. This method must not to be called
by clients; it is only for the registry and the communication framework.componentType - The name of the component type of which to retrieve
the configured interface.ConfigurationException - If the designated component type is not
configured for this registry, a
ConfigurationException will be thrown.<T> T getModelFactory(java.lang.String modelFactoryName,
java.lang.Class<T> modelFactoryType)
throws ServiceNotKnownException
T - The type of the requested model factory registry.modelFactoryName - The name of the requested model factory. Use the
names declared in
ModelRegistryConstants. No
other model factory registries need to exist.modelFactoryType - The type of the requested model factory registry.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.<T extends ADEPT2Service> T getServiceOfType(SessionToken session, java.lang.String serviceTypeName, java.lang.Class<T> serviceType) throws ServiceNotKnownException
T - The type which the requested service is expected to be of. This
is a subtype of ADEPT2Service and either the
registered service type or a super type hereof.session - The session which is used to check for access rights on this
method.serviceTypeName - The type name of the requested service. Refer to
ComponentTypes and
BaseConstants for valid
predefined service type names. Other service type names are also
valid if the corresponding services are configured appropriately.
ADEPT2Service and the interface configured for the
service type or a super type hereof.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.java.lang.IllegalArgumentException - If the designated service type interface
does not conform to the interface configured for the service
type, an IllegalArgumentException will be thrown.<T> T getConfiguredPlugin(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType) throws ServiceNotKnownException
getConfiguredPlugin(SessionToken, Object, String, Class, String)
except that the default plugin instance is used, that is the first
configured one. Therefore this will not be a runtime plugin.T - The type of the requested plugin.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugin and which is
provided in to the plugin when creating it. This allows the plugin
to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.<T> java.util.Map<java.lang.String,T> getConfiguredPlugins(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType) throws ServiceNotKnownException
T - The plugin type of the requested instances.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugins and which is
provided to the plugins when creating them. This allows the
plugins to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.<T> T getConfiguredPlugin(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType, java.lang.String pluginInstanceName) throws ServiceNotKnownException
T - The type of the requested plugin.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugin and which is
provided in to the plugin when creating it. This allows the plugin
to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.pluginInstanceName - The simple name of the plugin instance to
retrieve. This is either configured in the server/client
configuration or in a configuration found at runtime.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.<T extends ADEPT2Service> T getService(SessionToken session, java.lang.String serviceName, java.lang.Class<T> serviceType) throws ServiceNotKnownException
T - The type of the requested service. This is a subtype of
ADEPT2Service and either interface configured for the
service type or a super type hereof.session - The session which is used to check for access rights on this
method.serviceName - The hierarchical instance name of the service.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.java.lang.IllegalArgumentException - If the designated service type interface
does not conform to the interface configured for the service
type, an IllegalArgumentException will be thrown.<T extends ADEPT2Service> T getService(SessionToken session, java.net.URI[] serviceURIs, java.lang.Class<T> serviceType) throws ServiceNotKnownException
T - The type of the requested service. This is a subtype of
ADEPT2Service and either interface configured for the
service type or a super type hereof.session - The session which is used to check for access rights on this
method.serviceURIs - The URIs of the service to be retrieved, the array has
to contain at least one valid service URI.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.InvalidServiceStateException - If
this registry failed to start or is shut down, an
InvalidServiceStateException will be thrown.NullArgumentException - If one of the parameters is null, a
NullArgumentException will be thrown.java.lang.IllegalArgumentException - If
IllegalArgumentException will be thrown.