|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface extends the Component interface
to provide additional service-based functionality to the
Openwings architecture.
| Method Summary | |
ContainerAccess |
getContainerAccess()
This method is used to obtain access to the Container in which this component is running. |
Manager |
getManager()
This method is used to obtain a management context that the component can use to instantiate management plug-ins (MBeans). |
PolicyLoader |
getPolicyLoader()
This method is used to obtain a PolicyLoader that the
component can use to instantiate policies. |
java.lang.Object |
getUserInterface(UniqueID serviceID)
This method is used to obtain a User Interface for a given service object. |
UniqueID |
provideService(java.lang.Class serviceInterface,
java.lang.Object service,
ProvideServiceParameters parameters)
This method is used to make a synchronous (remote method) service available to other components (join). |
void |
publishService(java.lang.Class serviceInterface,
EventServiceListener listener,
EventServiceParameters parameters)
This method registers for notification of the ability to publish an asynchronous (event or messaging) service. |
ServiceResult |
publishService(java.lang.Class serviceInterface,
EventServiceParameters parameters)
This method is used to indicate that the component will publish an asynchronous (event or messaging) service. |
ServiceResult |
publishService(java.lang.Class serviceInterface,
PublishServiceParameters parameters)
This method is used to explicitly create a topic for publishing an asynchronous (event or messaging) service. |
void |
subscribeService(java.lang.Class serviceInterface,
java.lang.Object service,
EventServiceListener listener,
EventServiceParameters parameters)
This method registers for notification of the ability to subscribe to an asynchronous (event or messaging) service. |
ServiceResult |
subscribeService(java.lang.Class serviceInterface,
java.lang.Object service,
EventServiceParameters parameters)
This method is used to subscribe to a an asynchronous (event or messaging) service. |
void |
useService(java.lang.Class serviceInterface,
UseServiceListener listener,
UseServiceParameters parameters)
This method registers for notification of synchronous (remote method) services provided other components (lookup). |
ServiceResult[] |
useService(java.lang.Class serviceInterface,
UseServiceParameters parameters)
This method finds multiple synchronous (remote method) services provided by another component (lookup). |
| Methods inherited from interface net.openwings.component.Component |
connectDistributedObject, discardUsedService, disconnectDistributedObject, distributeObject, distributeObject, getComponentDescriptor, getComponentID, provideService, provideService, publishService, publishService, removeEventServiceListener, removeProvidedService, removeUseServiceListener, shutdown, subscribeService, subscribeService, undistributeObject, unpublishService, unsubscribeService, useService, useService |
| Method Detail |
public PolicyLoader getPolicyLoader()
PolicyLoader that the
component can use to instantiate policies. Calling this
method repeatedly returns the same PolicyLoader.
This method returns the same result as
net.openwings.policy.PolicyLoaderFactory.getPolicyLoader().
PolicyLoaderpublic Manager getManager()
Manager.
This method returns the same result as
net.openwings.management.ManagerFactory.getManager().
Managerpublic ContainerAccess getContainerAccess()
ContainerAccess.
This method returns the same result as
net.openwings.containerContainerAccessFactory.getContainerAccess().
ContainerAccess object, or
null if this component is not running
in an Openwings Container.
public UniqueID provideService(java.lang.Class serviceInterface,
java.lang.Object service,
ProvideServiceParameters parameters)
throws InvalidServiceException
ProvideServiceParameters object which
describes how the service is provided.
A service object that is intended to receive remote calls
should be a distributed object, that is, an object returned
from the distributeObject() method.
Repeated calls to this method for the same
serviceInterface/service with a
new parameters object cause the new parameters
to be applied in place of the old.
Repeated calls to this method with all arguments the same have
no effect unless removeProvidedService() has
been called.
If a service is provided with the correct serviceInterface
and service but there is a problem with a particular
discovery plug-in, no Exception is thrown.
Instead the component continues using other discovery plug-ins to
try to provide the service.
serviceInterface - interface describing the service providedservice - object implementing the specified interfaceparameters - controls the providing of this service
InvalidServiceException - thrown if service
does not implement Serializable and
serviceInterface
public ServiceResult[] useService(java.lang.Class serviceInterface,
UseServiceParameters parameters)
throws InvalidServiceException
This variant adds a UseServiceParameters object
which controls how the service is selected and attached.
Repeated calls to this method with the same
serviceInterface and parameters may return
different sets of service objects.
serviceInterface - interface describing the desired
service or null for all service interfacesparameters - controls the selection and use of a service.
ServiceResult objects, each
containing a service object implementing
the specified interface and its unique identifier, or
null if no services could be located
InvalidServiceException - thrown if:
serviceInterface is not a valid interface
or null
public void useService(java.lang.Class serviceInterface,
UseServiceListener listener,
UseServiceParameters parameters)
throws InvalidServiceException
This variant adds a UseServiceParameters object
which controls how services are selected and attached.
Repeated calls to this method for the same
serviceInterface/listener, with a
new parameters object cause the new parameters
to be applied in place of the old.
Repeated calls to this method with identical arguments have no effect.
serviceInterface - interface describing the desired
service or null for all service interfaceslistener - notification objectparameters - controls the selection and use of a service.
InvalidServiceException - thrown if
serviceInterface is not a valid interface
or nullpublic java.lang.Object getUserInterface(UniqueID serviceID)
ServiceResult or
ServiceResult, but
the buildUserInterfaceImmediately parameter
in UseServiceParameters or
EventServiceParameters can be set to override this.
In that case, this method would be called to obtain the UI.
serviceID - unique identifier for a service
public ServiceResult publishService(java.lang.Class serviceInterface,
PublishServiceParameters parameters)
throws InvalidServiceException
PublishServiceParameters is used to describe
the service (topic).
Repeated calls to this method with identical arguments have
no effect unless unpublishService has been called.
Repeated calls to this method for the same
serviceInterface with a new parameters object
cause the new parameters to be applied in place of the old.
serviceInterface - interface describing the serviceparameters - describes attributes and user interfaces associated
with the service (topic).
ServiceResult containing object implementing
serviceInterface and a unique identifier for the service
(topic)
InvalidServiceException - thrown if
serviceInterfaceis not a valid interface
public ServiceResult publishService(java.lang.Class serviceInterface,
EventServiceParameters parameters)
throws InvalidServiceException
EventServiceParameters which is used
to select the service (topic).
Repeated calls to this method with the same
serviceInterface and parameters may return
different results.
serviceInterface - interface describing the serviceparameters - controls the selection of the service (topic).
InvalidServiceException - thrown if
serviceInterfaceis not a valid interface
public void publishService(java.lang.Class serviceInterface,
EventServiceListener listener,
EventServiceParameters parameters)
throws InvalidServiceException
EventServiceParameters which is used
to select the service (topic).
The EventServiceListener is notified when the desired
topic becomes available.
Repeated calls to this method with identical parameters have no
effect unless removeEventServiceListener() has been called.
Repeated calls to this method for the same
serviceInterface with a new parameters object
cause the new parameters to be applied in place of the old.
serviceInterface - interface describing the servicelistener - notification objectparameters - controls the selection of the service (topic).
InvalidServiceException - thrown if
serviceInterfaceis not a valid interface
public ServiceResult subscribeService(java.lang.Class serviceInterface,
java.lang.Object service,
EventServiceParameters parameters)
throws InvalidServiceException
This variant adds an EventServiceParameters object
which controls how services (topics) are selected.
Repeated calls to this method with identical arguments
have no effect unless unsubscribeService has been called.
serviceInterface - interface describing the serviceservice - object implementing the specified interfaceparameters - controls the selection of the service (topic).
InvalidServiceException - thrown if
servicedoes not implement
serviceInterface
serviceInterfaceis not a valid interface
public void subscribeService(java.lang.Class serviceInterface,
java.lang.Object service,
EventServiceListener listener,
EventServiceParameters parameters)
throws InvalidServiceException
This variant adds an EventServiceParameters object
which controls how services (topics) are selected.
Repeated calls to this method with identical arguments have
no effect unless removeUseServiceListener has been called.
Repeated calls to this method for the same
serviceInterface with a new parameters object
cause the new parameters to be applied in place of the old.
serviceInterface - interface describing the serviceservice - object implementing the specified interfacelistener - notification objectparameters - controls the selection of the service (topic).
InvalidServiceException - thrown if
servicedoes not implement
serviceInterface
serviceInterfaceis not a valid interface
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||