|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.jsb.ServiceElementUtil
public class ServiceElementUtil
The ServiceElementUtil class provides static methods to assist in working
with a ServiceElement
| Constructor Summary | |
|---|---|
ServiceElementUtil()
|
|
| Method Summary | |
|---|---|
static ServiceBeanConfig |
addConfigParameter(ServiceBeanConfig sbc,
String key,
Integer value)
Add a name,value pair to the ServiceBeanConfig |
static ServiceElement |
copyServiceElement(ServiceElement sElem)
Make a copy of the ServiceElement |
static ServiceElement |
create(String serviceName,
String implClassName,
Iterable<String> interfaceClassNames,
Iterable<String> implJars,
Iterable<String> downloadJars,
String codebase,
String... group)
Create a dynamic ServiceElement |
static String |
formatDiscoverySettings(ServiceBeanConfig sbConfig)
Format discovery settings |
static AssociationDescriptor[] |
getAssociationDescriptors(ServiceElement elem,
AssociationType type)
Get the AssociationDescriptors from the ServiceElement that match the AssociationType type |
static PlatformCapability[] |
getMatchedPlatformCapabilities(ServiceElement sElem,
PlatformCapability[] pCaps)
Get the PlatformCapability instances that match declared operational requirements |
static long |
getNextID(long[] lArray)
Get the next instance ID |
static WatchDescriptor |
getWatchDescriptor(ServiceElement sElem,
String name)
Get the WatchDescriptor from an SLA for the given ID |
static boolean |
hasDifferentGroups(ServiceElement sElem1,
ServiceElement sElem2)
Determine if the Discovery groups are different between the two ServiceElement instances |
static boolean |
hasDifferentLocators(ServiceElement sElem1,
ServiceElement sElem2)
Determine if the LookupLocators are different between the two ServiceElement instances |
static boolean |
hasDifferentLoggerConfig(ServiceElement sElem1,
ServiceElement sElem2)
Determine if the LoggerConfig attributes are different between the two ServiceElement instances |
static boolean |
hasDifferentServiceUIs(Entry[] serviceUIs,
ServiceElement sElem2,
String codebase)
Determine if there are different ServiceUI declarations in the ServiceElement instance |
static boolean |
hasHTTPCodebase(ServiceElement sElem)
Determine if the ServiceElement has a HTTP based codebase |
static boolean |
matchesServiceElement(ServiceElement sElem,
String name,
String[] interfaces,
String opStringName)
Determines if the name, interfaces and opStringName equate to attributes found in the provided ServiceElement |
static ServiceBeanInstance |
prepareInstanceID(ServiceBeanInstance sbi,
long id)
Set the instanceID, optionally making a copy of the ServiceElement |
static ServiceElement |
prepareInstanceID(ServiceElement sElem,
boolean copy,
long id)
Set the instanceID, optionally making a copy of the ServiceElement |
static ServiceElement |
prepareInstanceID(ServiceElement sElem,
long id)
Make a copy of the ServiceElement and set the instance ID |
static void |
setCodebase(ServiceElement sElem,
String codebase)
Set the codebase for the ServiceElement |
static void |
setThreadDeadlockDetector(ServiceElement sElem,
MBeanServerConnection mbsc)
Check to see if the ThreadDeadlockMonitor has been declared as an SLA. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceElementUtil()
| Method Detail |
|---|
public static void setThreadDeadlockDetector(ServiceElement sElem,
MBeanServerConnection mbsc)
sElem - The ServiceElement to usembsc - An optional MBeanServerConnection to set to the
ThreadDeadlockDetector
IllegalArgumentException - if the ServiceElement parameter is null
public static WatchDescriptor getWatchDescriptor(ServiceElement sElem,
String name)
sElem - The ServiceElement to usename - The WatchDescriptor name
IllegalArgumentException - if either of the parameters are null
public static void setCodebase(ServiceElement sElem,
String codebase)
sElem - The ServiceElementcodebase - The codebase to set
IllegalArgumentException - if either of the parameters are nullpublic static boolean hasHTTPCodebase(ServiceElement sElem)
sElem - The ServiceElement
IllegalArgumentException - if either of the parameters are null
public static boolean hasDifferentLoggerConfig(ServiceElement sElem1,
ServiceElement sElem2)
sElem1 - ServiceElement to comparesElem2 - ServiceElement to compare
public static boolean hasDifferentServiceUIs(Entry[] serviceUIs,
ServiceElement sElem2,
String codebase)
serviceUIs - Array of attributessElem2 - ServiceElement to comparecodebase - The codebase to use
public static boolean hasDifferentGroups(ServiceElement sElem1,
ServiceElement sElem2)
sElem1 - ServiceElement to comparesElem2 - ServiceElement to compare
public static boolean hasDifferentLocators(ServiceElement sElem1,
ServiceElement sElem2)
sElem1 - ServiceElement to comparesElem2 - ServiceElement to compare
public static ServiceElement prepareInstanceID(ServiceElement sElem,
boolean copy,
long id)
sElem - The ServiceElement to usecopy - If true, make a copy of the ServiceElement before assigning
the instanceIDid - The instanceID to assign
public static ServiceBeanInstance prepareInstanceID(ServiceBeanInstance sbi,
long id)
sbi - The ServiceBeanInstance to useid - The instanceID to assign
public static ServiceElement prepareInstanceID(ServiceElement sElem,
long id)
sElem - ServiceElement to useid - the id to set
public static long getNextID(long[] lArray)
lArray - An array of ids
public static ServiceElement copyServiceElement(ServiceElement sElem)
sElem - The ServiceElement to copy
public static ServiceElement create(String serviceName,
String implClassName,
Iterable<String> interfaceClassNames,
Iterable<String> implJars,
Iterable<String> downloadJars,
String codebase,
String... group)
throws Exception
serviceName - The name of the service. Must not be null.implClassName - The implementation classname. Must not be null.interfaceClassNames - An iterable collection of interface classnames
the service exports, must not be null.implJars - An iterable collection of jars used to instantiate the
service, must not be null.downloadJars - An iterable collection of jars used as the codebase
of the service; for the jarscodebase - The location the resources, both the implementation
and codebase jars, can be accessed fromgroup - Name of the groups to use for discovery & join.
Exception - If the ServiceElement cannot be created.
public static ServiceBeanConfig addConfigParameter(ServiceBeanConfig sbc,
String key,
Integer value)
sbc - The current ServiceBeanConfig to setkey - The key to setvalue - The value for the key
public static boolean matchesServiceElement(ServiceElement sElem,
String name,
String[] interfaces,
String opStringName)
sElem - The ServiceElement to test, must not be nullname - The name to check, may be nullinterfaces - The ames of the interfaces the service advertises,
must not be nullopStringName - The name of the operationalString, may be null
public static PlatformCapability[] getMatchedPlatformCapabilities(ServiceElement sElem,
PlatformCapability[] pCaps)
sElem - The ServiceElement to usepCaps - Array of PlatformCapability objects
objects
PlatformCapability objects. If there
are no matching PlatformCapability instances, a zero-length array is
returned. A new array is allocated each time.
public static AssociationDescriptor[] getAssociationDescriptors(ServiceElement elem,
AssociationType type)
AssociationType type
elem - The ServiceElementtype - The AssociationType type
public static String formatDiscoverySettings(ServiceBeanConfig sbConfig)
sbConfig - The ServiceElement to use
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||