Rio Project 4.2 API Documentation



org.rioproject.core.jsb
Interface ServiceBeanContext

All Known Implementing Classes:
JSBContext

public interface ServiceBeanContext

Specifies the semantics for retrieving the context of a ServiceBean. A ServiceBeanContext provides a ServiceBean with necessary context required to obtain information about it's environment, attributes, ServiceBeanManager and ComputeResourceManager

Author:
Dennis Reedy

Method Summary
 void addAttribute(Entry attribute)
          Add an attribute to the collection of attributes used to describe the ServiceBean.
 AssociationManagement getAssociationManagement()
          Get the AssociationManagement object for the ServiceBean
 ComponentLoader getComponentLoader()
          Get the ComponentLoader for the ServiceBean.
 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
 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
 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
 WatchRegistry getWatchRegistry()
          Get the WatchRegistry for the ServiceBean.
 void registerEventHandler(EventDescriptor descriptor, EventHandler handler)
          Register an event handler.
 

Method Detail

getExportCodebase

String getExportCodebase()
Get the export codebase used to load ServiceBean download JARs

Returns:
The codebase identifies the codebase of the export JARs for the ServiceBean. The returned value is suitable for use in creating an HTTP protocol URL

getServiceBeanManager

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

Returns:
The ServiceBeanManager for the ServiceBean

getComputeResourceManager

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

Returns:
The ComputeResourceManager for the ServiceBean

getConfiguration

Configuration getConfiguration()
                               throws ConfigurationException
Get the ServiceBean Configuration object

Returns:
The Configuration object for a ServiceBean. A new Configuration object will be returned each time this method is invoked
Throws:
ConfigurationException - if there are problems creating the Configuration

getInitParameter

Object getInitParameter(String name)
Returns an Object containing the value of the named initialization parameter, or null if the parameter does not exist.

Parameters:
name - A String containing the name of the parameter whose value is requested
Returns:
The Object corresponding to the value of the parameter requested, or null if the parameter does not exist.

getInitParameterNames

Iterable<String> getInitParameterNames()
Get the names (keys) for all initialization parameters

Returns:
An Iterator 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 called

getServiceElement

ServiceElement getServiceElement()
Get the ServiceElement for the ServiceBean

Returns:
The ServiceElement object

getServiceBeanConfig

ServiceBeanConfig getServiceBeanConfig()
Get the ServiceBeanConfig for the ServiceBean

Returns:
The ServiceBeanConfig object

getDiscoveryManagement

DiscoveryManagement getDiscoveryManagement()
                                           throws IOException
Get the DiscoveryManagement object based on declared discovery attributes

Returns:
The DiscoveryManagement object for the ServiceBean
Throws:
IOException - If there are problems acquiring a DiscoveryManagement instance

getComponentLoader

ComponentLoader getComponentLoader()
Get the ComponentLoader 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

Returns:
The ComponentLoader

getAssociationManagement

AssociationManagement getAssociationManagement()
Get the AssociationManagement object for the ServiceBean

Returns:
The AssociationManagement object for the ServiceBean

registerEventHandler

void registerEventHandler(EventDescriptor descriptor,
                          EventHandler handler)
Register an event handler. This associates an EventHandler to an EventDescriptor for the ServiceBean.

Parameters:
descriptor - The EventDescriptor for the event
handler - The associated EventHandler

addAttribute

void addAttribute(Entry attribute)
Add an attribute to the collection of attributes used to describe the ServiceBean. Attributes added to the ServiceBeanContext will be accessed when the ServiceBean is being advertised for the first time.

Parameters:
attribute - Entry to add

getWatchRegistry

WatchRegistry getWatchRegistry()
Get the WatchRegistry for the ServiceBean.

Returns:
The WatchRegistry object for the ServiceBean

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.