|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.jsb.JSBContext
public class JSBContext
JSBContext implements the ServiceBeanContext interface
| Constructor Summary | |
|---|---|
JSBContext(ServiceElement sElem,
ServiceBeanManager serviceBeanManager,
ComputeResource computeResource,
Configuration sharedConfig)
Create a JSBContext |
|
| Method Summary | |
|---|---|
void |
addAttribute(Entry attribute)
Add an attribute to the collection of attributes used to describe the ServiceBean. |
PlatformCapability |
addPlatformCapability(String className,
URL location,
Map<String,Object> mapping)
Add a PlatformCapability. |
static PlatformCapability |
createPlatformCapability(String className,
URL[] classPath,
Map<String,Object> mapping)
Create a PlatformCapability |
AssociationManagement |
getAssociationManagement()
Get the AssociationManagement object for the ServiceBean |
Collection<Entry> |
getAttributes()
Get the attribute list |
ComponentLoader |
getComponentLoader()
Get the ComponentLoader for the ServiceBean. |
ComputeResource |
getComputeResource()
Get the ComputeResource object |
ComputeResourceManager |
getComputeResourceManager()
The ComputeResourceManager provides a mechanism for the ServiceBean to obtain the ComputeResource object and acquire information about the environment and attributes of the ComputeResource |
Configuration |
getConfiguration()
Get the ServiceBean Configuration object |
DiscoveryManagement |
getDiscoveryManagement()
Get the DiscoveryManagement object based on declared discovery attributes |
Map<Long,EventHandler> |
getEventTable()
The eventTable associates an EventHandler to an EventDescriptor for the ServiceBean. |
String |
getExportCodebase()
Get the export codebase used to load ServiceBean download JARs |
Object |
getInitParameter(String name)
Returns an Object containing the value of the named
initialization parameter, or null if the parameter does not exist. |
Iterable<String> |
getInitParameterNames()
Get the names (keys) for all initialization parameters |
MeasurableCapability[] |
getMatchedMeasurableCapabilities()
Get the MeasurableCapability instances that match declared SLAs. |
PlatformCapability[] |
getMatchedPlatformCapabilities()
Get the PlatformCapability instances that match declared system requirements |
String |
getOperationalStringName()
Get the name of the OperationalString |
PlatformCapability |
getPlatformCapability(String name)
Get a PlatformCapability instance from a name |
ServiceBeanConfig |
getServiceBeanConfig()
Get the ServiceBeanConfig for the ServiceBean |
ServiceBeanManager |
getServiceBeanManager()
The ServiceBeanManager provides a mechanism for the ServiceBean to obtain a DiscardManager, request it's ServiceElement be updated to OperationalStringManager instance(s) and obtain system resources |
ServiceElement |
getServiceElement()
Get the ServiceElement for the ServiceBean |
Configuration |
getSharedConfiguration()
Get the shared config |
Subject |
getSubject()
Get the Subject used to authenticate the service |
WatchRegistry |
getWatchRegistry()
Get the WatchRegistry for the ServiceBean. |
void |
registerEventHandler(EventDescriptor descriptor,
EventHandler handler)
Register an event handler. |
void |
removePlatformCapabilities()
Remove all PlatformCapability instances the ServiceBean added |
boolean |
removePlatformCapability(PlatformCapability pCap)
Remove a PlatformCapability that was added by the ServiceBean. |
void |
setServiceBeanManager(ServiceBeanManager serviceBeanManager)
Set the ServiceBeanManager for the ServiceBean |
void |
setServiceElement(ServiceElement newElem)
Set the ServiceElement for the ServiceBean |
void |
setSubject(Subject subject)
Set the Subject used to authenticate the service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSBContext(ServiceElement sElem,
ServiceBeanManager serviceBeanManager,
ComputeResource computeResource,
Configuration sharedConfig)
sElem - The ServiceElementserviceBeanManager - The ServiceBeanManagercomputeResource - The ComputeResource object representing
capabilities of the compute resource the service has been instantiated onsharedConfig - Configuration from the "platform" which will be used
as the shared configuration with an AggregateConfig| Method Detail |
|---|
public Configuration getSharedConfiguration()
public void setSubject(Subject subject)
subject - The Subjectpublic Subject getSubject()
public void setServiceElement(ServiceElement newElem)
newElem - The ServiceElementpublic ComponentLoader getComponentLoader()
ServiceBeanContextComponentLoader for the ServiceBean. The
ComponentLoader provides a mechanism for the ServiceBean to load classes
and resources (such as native libraries) making them (and the resources it
uses) available to all services
getComponentLoader in interface ServiceBeanContextServiceBeanContext.getComponentLoader()public String getExportCodebase()
ServiceBeanContext
getExportCodebase in interface ServiceBeanContextURLServiceBeanContext.getExportCodebase()
public Configuration getConfiguration()
throws ConfigurationException
ServiceBeanContextConfiguration object
getConfiguration in interface ServiceBeanContextConfiguration object for
a ServiceBean. A new Configuration object will
be returned each time this method is invoked
ConfigurationException - if there are problems creating the
ConfigurationServiceBeanContext.getConfiguration()public ServiceBeanConfig getServiceBeanConfig()
ServiceBeanContext
getServiceBeanConfig in interface ServiceBeanContextServiceBeanConfig objectServiceBeanContext.getServiceBeanConfig()public ServiceElement getServiceElement()
ServiceBeanContext
getServiceElement in interface ServiceBeanContextServiceElement objectServiceBeanContext.getServiceElement()public void setServiceBeanManager(ServiceBeanManager serviceBeanManager)
serviceBeanManager - The ServiceBeanManagerpublic ServiceBeanManager getServiceBeanManager()
ServiceBeanContext
getServiceBeanManager in interface ServiceBeanContextServiceBeanManager for the
ServiceBeanServiceBeanContext.getServiceBeanManager()public ComputeResourceManager getComputeResourceManager()
ServiceBeanContext
getComputeResourceManager in interface ServiceBeanContextComputeResourceManager for the
ServiceBeanServiceBeanContext.getComputeResourceManager()public Object getInitParameter(String name)
ServiceBeanContextObject containing the value of the named
initialization parameter, or null if the parameter does not exist.
getInitParameter in interface ServiceBeanContextname - A String containing the name of the parameter
whose value is requested
Object corresponding to the value of the
parameter requested, or null if the parameter does not exist.ServiceBeanContext.getInitParameter(java.lang.String)public Iterable<String> getInitParameterNames()
ServiceBeanContext
getInitParameterNames in interface ServiceBeanContextIterator of the names of the ServiceBean's
initialization parameters, or an empty Iterator
if the ServiceBean has no initialization parameters.
A new Iterator is returned each time this method is
calledServiceBeanContext.getInitParameterNames()public String getOperationalStringName()
public DiscoveryManagement getDiscoveryManagement()
throws IOException
ServiceBeanContext
getDiscoveryManagement in interface ServiceBeanContextDiscoveryManagement object for the
ServiceBean
IOException - If there are problems acquiring a
DiscoveryManagement instanceServiceBeanContext.getDiscoveryManagement()public AssociationManagement getAssociationManagement()
ServiceBeanContext
getAssociationManagement in interface ServiceBeanContextAssociationManagement object for the
ServiceBeanServiceBeanContext.getAssociationManagement()public WatchRegistry getWatchRegistry()
ServiceBeanContextWatchRegistry for the ServiceBean.
getWatchRegistry in interface ServiceBeanContextWatchRegistry object for the
ServiceBeanServiceBeanContext.getWatchRegistry()public Map<Long,EventHandler> getEventTable()
public void registerEventHandler(EventDescriptor descriptor,
EventHandler handler)
ServiceBeanContext
registerEventHandler in interface ServiceBeanContextdescriptor - The EventDescriptor for the eventhandler - The associated EventHandlerServiceBeanContext.registerEventHandler(org.rioproject.event.EventDescriptor, org.rioproject.event.EventHandler)public void addAttribute(Entry attribute)
ServiceBeanContext
addAttribute in interface ServiceBeanContextattribute - Entry to addServiceBeanContext.addAttribute(net.jini.core.entry.Entry)public Collection<Entry> getAttributes()
public ComputeResource getComputeResource()
ComputeResourceManager
getComputeResource in interface ComputeResourceManagerComputeResourceManager.getComputeResource()public PlatformCapability getPlatformCapability(String name)
ComputeResourceManager
getPlatformCapability in interface ComputeResourceManagername - The name of the PlatformCapability
ComputeResourceManager.getPlatformCapability(java.lang.String)public PlatformCapability[] getMatchedPlatformCapabilities()
ComputeResourceManager
getMatchedPlatformCapabilities in interface ComputeResourceManagerComputeResourceManager.getMatchedPlatformCapabilities()
public PlatformCapability addPlatformCapability(String className,
URL location,
Map<String,Object> mapping)
ComputeResourceManager
addPlatformCapability in interface ComputeResourceManagerclassName - The class name of the PlatformCapability. This name
must be suitable for Class.forName uselocation - An URL indicating where to load the PlatformCapability
from. If this parmater is null, the PlatformCapability will be loaded
from platform-capabilities.jarmapping - The Map of name,value pairs the PlatformCapability will
set
ComputeResourceManager.addPlatformCapability(java.lang.String, java.net.URL, java.util.Map)
public static PlatformCapability createPlatformCapability(String className,
URL[] classPath,
Map<String,Object> mapping)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
className - The fully qualified classname to instantiate, must not be nullclassPath - Array of URL locations defining the classpath to
load the PlatformCapability. The common classloader will be checked first to
determine if the class can be loaded, if it cannot, and the classpath parameter
contains URL values, the classPath location(s) will be added to the common
classloadermapping - If not null, the attributes will be set to the instantiated
PlatformCapability
ClassNotFoundException - If the platform capability class cannot
be found
IllegalAccessException - If there is a security exception
InstantiationException - If the class cannot be createdpublic boolean removePlatformCapability(PlatformCapability pCap)
ComputeResourceManager
removePlatformCapability in interface ComputeResourceManagerpCap - The PlatformCapability to remove
ComputeResourceManager.removePlatformCapability(org.rioproject.system.capability.PlatformCapability)public void removePlatformCapabilities()
public MeasurableCapability[] getMatchedMeasurableCapabilities()
ComputeResourceManager
getMatchedMeasurableCapabilities in interface ComputeResourceManagerComputeResourceManager.getMatchedMeasurableCapabilities()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||