|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.associations.AssociationDescriptor
public class AssociationDescriptor
The AssociationDescriptor defines the attributes needed to create, manage and
monitor Association instances.
| Field Summary | |
|---|---|
static String |
CGLIB_PROXY
|
static String |
JDK_PROXY
|
static String |
NO_NAME
If an AssociationDescriptor is created with a null for the name property, the AssociationDescriptor name property will be set to this value |
| Constructor Summary | |
|---|---|
AssociationDescriptor()
Create an AssociationDescriptor |
|
AssociationDescriptor(AssociationType type)
Create an AssociationDescriptor |
|
AssociationDescriptor(AssociationType type,
String name)
Create an AssociationDescriptor |
|
AssociationDescriptor(AssociationType type,
String name,
String opStringName,
String propertyName)
Create an AssociationDescriptor |
|
| Method Summary | |
|---|---|
static AssociationDescriptor |
create(String name,
Class serviceClass,
String... groups)
Creates a "uses" AssociationDescriptor for a service, matching on the service name |
static AssociationDescriptor |
create(String name,
String setter,
Class serviceClass,
AssociationType type,
String... groups)
Creates an AssociationDescriptor for a service, matching on the service name |
static AssociationDescriptor |
create(String name,
String setter,
Class serviceClass,
String... groups)
Creates a "uses" AssociationDescriptor for a service, matching on the service name |
boolean |
equals(Object obj)
An AssociationDescriptor is equal to another AssociationDescriptor if their name, opStringName and AssociationType attributes are equal |
String |
getAssociationMatchFilter()
Get the association match filter class name |
AssociationType |
getAssociationType()
Get the AssociationDescriptor type |
ClassBundle |
getFaultDetectionHandlerBundle()
Get a FaultDetectionHandler from the
Configuration |
String[] |
getGroups()
Returns an array consisting of the names of the groups whose members are the lookup services to discover. |
String[] |
getInterfaceNames()
Get the the Array of public interfaces the associated service implements |
LookupLocator[] |
getLocators()
Returns an array consisting of instances of LookupLocator in which each
instance corresponds to a specific lookup service to discover |
String |
getName()
Get the associated service's name |
String |
getOperationalStringName()
Get the associated service's OperationalString name |
String |
getPropertyName()
Get the propertyName |
String |
getProxyClass()
Get the proxy factory |
String |
getProxyType()
Get the proxy type to create for the Association |
long |
getServiceDiscoveryTimeout()
Get the service discovery timeout |
TimeUnit |
getServiceDiscoveryTimeUnits()
Get the unit of time for the service discovery timeout |
String |
getServiceSelectionStrategy()
Get the ServiceSelectionStrategy
classname to use for selecting associated services. |
int |
hashCode()
Override hashCode to return the hashCode of the name, opStringName and AssociationType hashCodes |
boolean |
isLazyInject()
Get the association injection style |
boolean |
matchOnName()
If this method returns true then the name of the service is used in addition to the interfaces implemented by the service or service proxy to track service instances. |
void |
setAssociationMatchFilter(String associationMatchFilter)
Set the association match filter class name |
void |
setFaultDetectionHandlerBundle(ClassBundle fdhBundle)
Set the FaultDetectionHandler ClassBundle |
void |
setGroups(String... groups)
Set the Lookup groups the used to discover the associated service. |
void |
setInterfaceNames(String... interfaces)
Set the Array of public interface names the associated service implements |
void |
setLazyInject(boolean lazyInject)
Set the association injection style |
void |
setLocators(LookupLocator... lookupLocators)
This method provides the ability to set the array of locators that this ServiceBean would like to join. |
void |
setMatchOnName(boolean matchOnName)
Set the matchOnName property |
void |
setName(String name)
Set the associated service's name |
void |
setOperationalStringName(String opStringName)
Set the associated service's OperationalString name |
void |
setPropertyName(String propertyName)
Set the propertyName |
void |
setProxyClass(String proxyClass)
Set the proxy factory |
void |
setProxyType(String proxyType)
Set the proxy type to create for the Association |
void |
setServiceDiscoveryTimeout(long serviceDiscoveryTimeout)
Set the timeout for service discovery |
void |
setServiceDiscoveryTimeUnits(TimeUnit serviceDiscoveryTimeUnits)
Set the unit of time for the service discovery timeout |
void |
setServiceSelectionStrategy(String serviceStrategyClass)
Set the ServiceSelectionStrategy to use
when selecting associated services. |
String |
toString()
Override toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_NAME
public static final String JDK_PROXY
public static final String CGLIB_PROXY
| Constructor Detail |
|---|
public AssociationDescriptor()
public AssociationDescriptor(AssociationType type)
type - The AssociationType
public AssociationDescriptor(AssociationType type,
String name)
type - The AssociationTypename - The name of the associated service, may be null
public AssociationDescriptor(AssociationType type,
String name,
String opStringName,
String propertyName)
type - The AssociationTypename - The name of the associated serviceopStringName - The name of the OperationalString the
associated service is part of, may be nullpropertyName - The property to set when the associated service is
discovered, changed or broken. May be null| Method Detail |
|---|
public AssociationType getAssociationType()
public void setPropertyName(String propertyName)
propertyName - The propertyName to use to inject the Associationpublic String getPropertyName()
public void setName(String name)
name - The associated service's name.public String getName()
NO_NAME value is returnedpublic void setMatchOnName(boolean matchOnName)
matchOnName - Whether the association should match on the service
name.
IllegalArgumentException - If the AssociationDescriptor has it's
name property set to null and the matchOnName value is truepublic boolean matchOnName()
getName
methodpublic void setInterfaceNames(String... interfaces)
interfaces - Array of public interface names the associated
service implementspublic String[] getInterfaceNames()
public String getOperationalStringName()
public void setOperationalStringName(String opStringName)
opStringName - The associated service's
OperationalString namepublic void setFaultDetectionHandlerBundle(ClassBundle fdhBundle)
FaultDetectionHandler ClassBundle
fdhBundle - The ClassBundle used to
create the fault detection handlerpublic ClassBundle getFaultDetectionHandlerBundle()
FaultDetectionHandler from the
Configuration
public void setGroups(String... groups)
groups - Array of String group names whose members are
the lookup services to discover. Elements contained within the array may
be modified as follows:
public void setLocators(LookupLocator... lookupLocators)
lookupLocators - Array of LookupLocator instancespublic String[] getGroups()
public LookupLocator[] getLocators()
LookupLocator in which each
instance corresponds to a specific lookup service to discover
public void setProxyClass(String proxyClass)
proxyClass - The class name of the
AssociationProxy to usepublic String getProxyClass()
AssociationProxy to usepublic void setProxyType(String proxyType)
proxyType - The type of proxy to generate. May be null. If not
null, must be either JDK_PROXY or
CGLIB_PROXY.public String getProxyType()
JDK_PROXY or
CGLIB_PROXYpublic void setAssociationMatchFilter(String associationMatchFilter)
associationMatchFilter - The classname of the
AssociationMatchFilterpublic String getAssociationMatchFilter()
AssociationMatchFilterpublic void setServiceSelectionStrategy(String serviceStrategyClass)
ServiceSelectionStrategy to use
when selecting associated services.
serviceStrategyClass - The classname of the ServiceSelectionStrategy.
The ServiceSelectionStrategy must have a zero-arg constructor and
implement ServiceSelectionStrategypublic String getServiceSelectionStrategy()
ServiceSelectionStrategy
classname to use for selecting associated services.
ServiceSelectionStrategypublic boolean isLazyInject()
public void setLazyInject(boolean lazyInject)
lazyInject - If true, the association will be injected when the
service is discovered. If false the association will be injected
immediately.public void setServiceDiscoveryTimeout(long serviceDiscoveryTimeout)
serviceDiscoveryTimeout - The service discovery timeout.public long getServiceDiscoveryTimeout()
public void setServiceDiscoveryTimeUnits(TimeUnit serviceDiscoveryTimeUnits)
serviceDiscoveryTimeUnits - The unit of time for the service
discovery timeoutpublic TimeUnit getServiceDiscoveryTimeUnits()
public static AssociationDescriptor create(String name,
Class serviceClass,
String... groups)
name - The service nameserviceClass - The service's exported proxy classgroups - Discovery groups to use
public static AssociationDescriptor create(String name,
String setter,
Class serviceClass,
String... groups)
name - The service namesetter - The setter property to use when injectingserviceClass - The service's exported proxy classgroups - Discovery groups to use
public static AssociationDescriptor create(String name,
String setter,
Class serviceClass,
AssociationType type,
String... groups)
name - The service namesetter - The setter property to use when injectingserviceClass - The service's exported proxy classtype, - The type of Association to creategroups - Discovery groups to use
public int hashCode()
AssociationType hashCodes
hashCode in class Objectpublic boolean equals(Object obj)
AssociationType attributes are equal
equals in class Objectpublic String toString()
toString in class Object
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||