|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.associations.Association<T>
public class Association<T>
Associations provide a mechanism to model and enforce uses and requires
associations between services in an
OperationalString. Associations take 5 forms:
Associations are optional and may be declared as part of a service's
OperationalString declaration. An example :
Once provisioned a service can obtain it's Associations from the
ServiceBeanContext.getAssociationManagement()
method.
| Nested Class Summary | |
|---|---|
static class |
Association.State
Association State enums indicate the following: PENDING: Indicates that an associated service has not been discovered DISCOVERED: Indicates that an associated service has been discovered CHANGED: Indicates that an associated service has changed, that is an end-point has changed, and the association now points a different service BROKEN: Indicates that the association is broken |
| Constructor Summary | |
|---|---|
Association(AssociationDescriptor descriptor)
Create an Association |
|
| Method Summary | |
|---|---|
boolean |
addServiceItem(ServiceItem item)
Add a service to the Association |
AssociationDescriptor |
getAssociationDescriptor()
Get the AssociationDescriptor |
AssociationType |
getAssociationType()
Get the AssociationType |
String |
getName()
Get the associated service's name |
ServiceItem |
getNextServiceItem()
Get the next ServiceItem in the collection of associated services. |
String |
getOperationalStringName()
Get the associated service's OperationalString name |
T |
getService()
Get the first service Object that can be used to communicate to the associated service. |
int |
getServiceCount()
Get the number of associated services |
Future<T> |
getServiceFuture()
Get a future representing pending service association. |
ServiceItem |
getServiceItem()
Get the ServiceItem for the service thats first in the List of services. |
ServiceItem |
getServiceItem(T service)
Get the ServiceItem for the associated service. |
ServiceItem[] |
getServiceItems()
Get ServiceItem instances for all known associated service instances. |
Collection<T> |
getServices()
Get all Objects that can be used to communicate to all known associated services. |
Association.State |
getState()
Get the Association state |
Iterator<T> |
iterator()
Satisfies the contract of an Iterable, allowing the
associated services to be the target of a "foreach" statement |
void |
registerAssociationServiceListener(AssociationServiceListener<T> al)
Register an AssociationServiceListener for notification. |
void |
removeAssociationServiceListener(AssociationServiceListener<T> al)
Remove a AssociationServiceListener for notification. |
ServiceItem |
removeService(T service)
Remove a service from the Association |
void |
setState(Association.State state)
Set the Association state |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Association(AssociationDescriptor descriptor)
descriptor - The AssociationDescriptor for
this association| Method Detail |
|---|
public AssociationType getAssociationType()
public void setState(Association.State state)
state - The Association statepublic Association.State getState()
public String getName()
public String getOperationalStringName()
public AssociationDescriptor getAssociationDescriptor()
AssociationDescriptor used to
create this Associationpublic int getServiceCount()
public T getService()
public Future<T> getServiceFuture()
AssociationProxy,
ServiceSelectionStrategypublic Collection<T> getServices()
public Iterator<T> iterator()
Iterable, allowing the
associated services to be the target of a "foreach" statement
iterator in interface Iterable<T>Iterable that can be used to iterate over
the collection of associated services. A new Iterable is created
each time.public ServiceItem getServiceItem()
public ServiceItem getServiceItem(T service)
ServiceID for that service will be returned
service - The proxy of an associated service
public ServiceItem[] getServiceItems()
public ServiceItem getNextServiceItem()
public boolean addServiceItem(ServiceItem item)
item - The ServiceItem for the service to add
public ServiceItem removeService(T service)
service - The proxy for the Service to remove
public void registerAssociationServiceListener(AssociationServiceListener<T> al)
AssociationServiceListener for notification.
al - The AssociationServiceListener. If the AssociationServiceListener
is not null and not already registered it will be added to the collection of
AssociationServiceListenerspublic void removeAssociationServiceListener(AssociationServiceListener<T> al)
AssociationServiceListener for notification.
al - The AssociationServiceListener. If the AssociationServiceListener
is not null and registered, it will be removed from the collection of
AssociationServiceListeners
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||