|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.server.impl.plugins.ComponentServerProxyPlugin
A ServerProxyPlugin, that controls the lifecycle of components on access
to services, that are provided by these components. No component model is defined
here - this plugin just controls the lifecycle of a component by calling the
ComponentDefinition.createComponent(Object) method, whenever a compoent
must be created and intialized in order to register the real service implementations.
The service implementations also will not be managed by this plugin; this
can be done by other plugins.
| Nested Class Summary |
| Nested classes inherited from class com.sdm.quasar.client.core.server.impl.ServerProxyPlugin |
ServerProxyPlugin.ServerProxyPluginCallback |
| Constructor Summary | |
ComponentServerProxyPlugin()
Creates a new ComponentServerProxyPlugin. |
|
| Method Summary | |
ComponentDefinition |
getComponentDefinition(java.lang.Object componentId)
Returns ComponentDefinition, for the component with the given
component-id. |
java.lang.Object |
getComponentId4Service(java.lang.Class serviceClass)
Returns the registered component id for the service class given, if a service- component-mapping is defined for that service. |
boolean |
hasServerService(java.lang.Class service,
ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
Tests, whether a service is registered with the service manager. |
boolean |
isComponentCreated(java.lang.Object componentId)
Returns true, if the component with the given component id
is created, returns false otherwise. |
java.lang.Object |
processServerServiceCall(java.lang.Class serverInterface,
java.lang.reflect.Method method,
java.lang.Object[] args,
ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
|
void |
registerComponent(java.lang.Object componentId,
ComponentDefinition componentDefinition)
Registers a ComponentDefinition for a component-id. |
void |
registerService(java.lang.String serviceClassName,
java.lang.Object componentId)
Registers a service to be provided by an component with the given id. |
void |
registerServicesAndComponentsWithReader(ComponentDefinitionReader componentDefinitionReader)
Adds component and service definitions using the ComponentDefinitionReader
to this ComponentServerProxyPlugin.
|
void |
unregisterComponent(java.lang.Object componentId)
Unregisters a previously registered ComponentDefinition for the
component-id given. |
void |
unregisterService(java.lang.String serviceClassName)
Unregisters a service to component mapping previously created via registerService(String, Object). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ComponentServerProxyPlugin()
ComponentServerProxyPlugin.
| Method Detail |
public void registerService(java.lang.String serviceClassName,
java.lang.Object componentId)
serviceClassName - the service name (full qualified class name of the interface, not null)componentId - the component id (not null)public void unregisterService(java.lang.String serviceClassName)
registerService(String, Object).
serviceClassName - the service name (full qualified class name of the interface, not null)public java.lang.Object getComponentId4Service(java.lang.Class serviceClass)
serviceClass - the service class to look for an component id
null, if no service-
component mapping is defined for that service class
public void registerComponent(java.lang.Object componentId,
ComponentDefinition componentDefinition)
ComponentDefinition for a component-id. The ComponentDefinition
will be created, when the first service-access is done.
componentId - the component-id (not null)componentDefinition - the ComponentDefinition (not null)public void unregisterComponent(java.lang.Object componentId)
ComponentDefinition for the
component-id given. The ComponentDefinition is destroyed at this time.
componentId - the component-id (not null)
public void registerServicesAndComponentsWithReader(ComponentDefinitionReader componentDefinitionReader)
throws java.io.IOException
ComponentDefinitionReader
to this ComponentServerProxyPlugin.
componentDefinitionReader - the ComponentDefinitionReader to be used for
reading the component and service definitions (not null)
java.io.IOException - if an exception occurs while reading the definitions.public boolean isComponentCreated(java.lang.Object componentId)
true, if the component with the given component id
is created, returns false otherwise.
componentId - the component-id (not null)
java.lang.IllegalArgumentException - if the component-id is unknown
(see registerComponent(Object, ComponentDefinition))public ComponentDefinition getComponentDefinition(java.lang.Object componentId)
ComponentDefinition, for the component with the given
component-id.
componentId - the component-id (not null)
ComponentDefinition for the component-id
java.lang.IllegalArgumentException - if the component-id is unknown
(see registerComponent(Object, ComponentDefinition))
public boolean hasServerService(java.lang.Class service,
ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
ServerProxyPlugin
hasServerService in interface ServerProxyPluginservice - the interface that defines the service
ServerProxyPlugin.hasServerService(java.lang.Class, com.sdm.quasar.client.core.server.impl.ServerProxyPlugin.ServerProxyPluginCallback)
public java.lang.Object processServerServiceCall(java.lang.Class serverInterface,
java.lang.reflect.Method method,
java.lang.Object[] args,
ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
throws java.lang.Throwable
processServerServiceCall in interface ServerProxyPluginserverInterface - method - args - serverProxyPluginCallback - a ServerProxyPlugin.ServerProxyPluginCallback to access the
subsequent ServerProxyPlugins without knowing them
java.lang.ThrowableServerProxyPlugin.processServerServiceCall(java.lang.Class, java.lang.reflect.Method, java.lang.Object[], com.sdm.quasar.client.core.server.impl.ServerProxyPlugin.ServerProxyPluginCallback)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||