|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.associations.AssociationMgmt
public class AssociationMgmt
The AssociationMgmt class implements the AssociationManagement interface.
| Nested Class Summary | |
|---|---|
class |
AssociationMgmt.AssociationHandler
The AssociationHandler handle an Association created from AssociationDescriptor. |
| Constructor Summary | |
|---|---|
AssociationMgmt()
Create an AssociationMgmt instance. |
|
AssociationMgmt(ClassLoader cl)
Create an AssociationMgmt instance. |
|
| Method Summary | ||
|---|---|---|
|
addAssociationDescriptor(AssociationDescriptor aDesc)
Add an association to the managed set of associations. |
|
List<Association<?>> |
addAssociationDescriptors(AssociationDescriptor... aDescs)
Add associations to the managed set of associations. |
|
protected AssociationMgmt.AssociationHandler |
createAssociationHandler(AssociationDescriptor aDesc)
Create an AssociationHandler |
|
|
getAssociation(Class<T> serviceType,
String serviceName,
String opStringName)
Get the first matching Association. |
|
AssociationMgmt.AssociationHandler |
getAssociationHandler(Association association)
|
|
protected AssociationListener<?>[] |
getAssociationListeners()
Get all AssociationListener instances |
|
List<Association<?>> |
getAssociations()
Get all managed associations. |
|
protected Configuration |
getConfiguration()
|
|
protected void |
notifyOnBroken(Association association,
Object service)
Notify listeners that the Association is broken |
|
protected void |
notifyOnChange(Association association,
Object service)
Notify listeners on Association change |
|
protected void |
notifyOnDiscovery(Association association,
Object service)
Notify listeners on discovery |
|
void |
register(AssociationListener... listeners)
Register AssociationListeners. |
|
void |
remove(AssociationListener... listeners)
Remove AssociationListeners |
|
void |
setBackend(Object backend)
Set the PropertyDescriptor elements. |
|
void |
setClientName(String clientName)
Set the name of the client that has the associations. |
|
void |
setConfiguration(Configuration config)
|
|
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 |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssociationMgmt()
public AssociationMgmt(ClassLoader cl)
cl - The class loader to provide the caller/client with properly| Method Detail |
|---|
public void setUnadvertiseOnBroken(boolean unadvertiseOnBroken)
setUnadvertiseOnBroken in interface AssociationManagementunadvertiseOnBroken - 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 ServiceBeanpublic void setServiceBeanControl(ServiceBeanControl control)
AssociationManagement
setServiceBeanControl in interface AssociationManagementcontrol - The ServiceBeanControl object for the ServiceBeanAssociationManagement.setServiceBeanControl(org.rioproject.jsb.ServiceBeanControl)public void setServiceBeanContainer(ServiceBeanContainer container)
setServiceBeanContainer in interface AssociationManagementcontainer - The ServiceBeanContainer that the ServiceBean is
running inpublic void 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
register in interface AssociationManagementlisteners - the AssociationListenerspublic void remove(AssociationListener... listeners)
AssociationListeners
remove in interface AssociationManagementlisteners - the AssociationListenerspublic void terminate()
terminate in interface AssociationManagement
public <T> Association<T> getAssociation(Class<T> serviceType,
String serviceName,
String opStringName)
getAssociation in interface AssociationManagementserviceType - 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
public List<Association<?>> getAssociations()
getAssociations in interface AssociationManagementpublic void setBackend(Object backend)
backend - The backend (implementation) to use for property injectionpublic void setClientName(String clientName)
clientName - The name of the client that has the associations.
This is used for logging and diagnosticspublic void setServiceBeanContext(ServiceBeanContext context)
AssociationManagement
setServiceBeanContext in interface AssociationManagementcontext - The ServiceBeanContest object for the ServiceBeanAssociationManagement.setServiceBeanContext(org.rioproject.core.jsb.ServiceBeanContext)protected Configuration getConfiguration()
public void setConfiguration(Configuration config)
public AssociationMgmt.AssociationHandler getAssociationHandler(Association association)
protected AssociationListener<?>[] getAssociationListeners()
protected AssociationMgmt.AssociationHandler createAssociationHandler(AssociationDescriptor aDesc)
aDesc - The AssociationDescriptor to create an AssociationHandler
for
NullPointerException - if the AssociationDescriptor is nullpublic <T> Association<T> addAssociationDescriptor(AssociationDescriptor aDesc)
addAssociationDescriptor in interface AssociationManagementaDesc - The AssociationDescriptor
AssociationProxy,
ServiceSelectionStrategypublic List<Association<?>> addAssociationDescriptors(AssociationDescriptor... aDescs)
addAssociationDescriptors in interface AssociationManagementaDescs - AssociationDescriptor instances
AssociationProxy,
ServiceSelectionStrategy
protected void notifyOnDiscovery(Association association,
Object service)
association - The Associationservice - The discovered service
protected void notifyOnChange(Association association,
Object service)
association - The Associationservice - The discovered service
protected void notifyOnBroken(Association association,
Object service)
association - The Associationservice - The discovered service
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||