|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AssociationManagement
AssociationManagement provides the necessary support to manage Associations a ServiceBean has to other services. Associations provide a mechanism to model and enforce uses and requires associations between services in an OperationalString. Associations are optional and may be declared as part of a ServiceBean element's specification. Associations take 2 forms:
Associations are created during the design/modelling phase and enforced
during runtime The AssociationManager will discover and monitor services
described in each Association. An Association will either be discovered,
changed or broken. Each state transition an Association goes through will
result in the notification of any AssociationListener objects which have
registered to this AssociationManagement instance. If the Association is of
type AssociationType.REQUIRES and the Association state
becomes Association.BROKEN and there are no services
that match the Association type that have a state of
Association.DISCOVERED, then the AssociationManagement object
will unadvertise the ServiceBean using the provided ServiceBeanControl
interface. Conversely, if the Association is of type
AssociationType.REQUIRES and a service is discovered which
matches the service type(s), then the Association state becomes
Association.DISCOVERED. If the ServiceBean is not advertised,
the AssociationManager will advertise the ServiceBean
| Method Summary | ||
|---|---|---|
|
addAssociationDescriptor(AssociationDescriptor descriptor)
Add an association to the managed set of associations. |
|
List<Association<?>> |
addAssociationDescriptors(AssociationDescriptor... descriptors)
Add associations to the managed set of associations. |
|
|
getAssociation(Class<T> serviceType,
String serviceName,
String opStringName)
Get the first matching Association. |
|
List<Association<?>> |
getAssociations()
Get all managed associations. |
|
void |
register(AssociationListener... listeners)
Register AssociationListeners. |
|
void |
remove(AssociationListener... listeners)
Remove AssociationListeners |
|
void |
setServiceBeanContainer(ServiceBeanContainer container)
Set the ServiceBeanContainer object |
|
void |
setServiceBeanContext(ServiceBeanContext context)
Set the ServiceBeanContext object for the ServiceBean |
|
void |
setServiceBeanControl(ServiceBeanControl control)
Set the ServiceBeanControl object for the ServiceBean |
|
void |
setUnadvertiseOnBroken(boolean unadvertiseOnBroken)
Set unadvertiseOnBroken |
|
void |
terminate()
Terminate AssociationManagement, cleaning up all connections |
|
| Method Detail |
|---|
void setServiceBeanControl(ServiceBeanControl control)
control - The ServiceBeanControl object for the ServiceBeanvoid setServiceBeanContext(ServiceBeanContext context)
context - The ServiceBeanContest object for the ServiceBeanvoid setServiceBeanContainer(ServiceBeanContainer container)
container - The ServiceBeanContainer that the ServiceBean is
running invoid register(AssociationListener... listeners)
AssociationListeners. Each listener object will receive
notifications of Association state changes. Once a listener is
registered, it will be notified of all Association references discovered to
date, and will be notified as Associations are discovered, changed or broken.
If the parameter value duplicates (using equals) another element in the set
of listeners, no action is taken. If the parameter value is null, an
IllegalArgumentException is thrown
listeners - the AssociationListenersvoid remove(AssociationListener... listeners)
AssociationListeners
listeners - the AssociationListenersvoid terminate()
<T> Association<T> getAssociation(Class<T> serviceType,
String serviceName,
String opStringName)
serviceType - The service type to match, must not be nullserviceName - String name of the associated service. If null will
be ignoredopStringName - String name of the OperationalString. If null will
be ignored
IllegalArgumentException - if the serviceType is null<T> Association<T> addAssociationDescriptor(AssociationDescriptor descriptor)
descriptor - The AssociationDescriptor
IllegalArgumentException - if the AssociationDescriptor is null.AssociationProxy,
ServiceSelectionStrategyList<Association<?>> addAssociationDescriptors(AssociationDescriptor... descriptors)
descriptors - AssociationDescriptor instances
IllegalArgumentException - if the AssociationDescriptor is null.AssociationProxy,
ServiceSelectionStrategyList<Association<?>> getAssociations()
void setUnadvertiseOnBroken(boolean unadvertiseOnBroken)
unadvertiseOnBroken - If true, and the service has an Association
with a type of AssociationType.REQUIRES and the Association is broken,
the AssociationManagement object will unadvertise the ServiceBean using
the ServiceBean instance's ServiceBeanControl object. If false, the
AssociationManagement object will not unadvertise the ServiceBean
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||