Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.core.jsb
Interface ServiceBeanManager

    public interface ServiceBeanManager

The ServiceBeanManager provides a mechanism for the ServiceBean to obtain a `DiscardManager`, have the `ServiceBeanConfig` updated to known `OperationalStringManager` instance(s), and increment, decrement oe relocate instances of the service

Method Summary
`void` | `addListener(ServiceElementChangeListener l)` Register for notification of ServiceElement changes.
`void` | `decrement(boolean destroy)` Decrement (decrease the number of) and remove this ServiceBean instance from the OperationalString.
`DiscardManager` | `getDiscardManager()` Get the DiscardManager for the ServiceBean.
`NotificationBroadcasterSupport` | `getNotificationBroadcasterSupport()` Get the class that can be used as the class that sends JMX notifications for the MBean
`OperationalStringManager` | `getOperationalStringManager()` Get the OperationalStringManager instance which is managing the OperationalString the ServiceBean is a part of
`ServiceBeanInstance` | `getServiceBeanInstance()` Get the ServiceBeanInstance for the ServiceBean
`Uuid` | `getServiceID()` Get the universally unique identifier for the ServiceBean
`void` | `increment(ServiceProvisionListener listener)` Increment (increase the number of) instances of the ServiceBean by one.
`void` | `relocate(ServiceProvisionListener listener, Uuid uuid)` Relocate (move) a ServiceBean instance to another compute resource
`void` | `removeListener(ServiceElementChangeListener l)` Remove a currently registered ServiceElementChangeListener instance from the set of listeners currently registered with the ServiceBeanManager.
`void` | `update(ServiceBeanConfig sbConfig)` Update a ServiceBean's ServiceBeanConfig to known `OperationalStringManager` instance(s)

Method Detail

### update

    void update(ServiceBeanConfig sbConfig)
                throws Exception

  Update a ServiceBean's ServiceBeanConfig to known `OperationalStringManager` instance(s)

  Parameters:
    `sbConfig` - The updated ServiceBeanConfig instance
  Throws:
    `Exception` - if any errors occur communicating with the OperationalStringManager, or with the OperationalStringManager's processing of the request

### increment

    void increment(ServiceProvisionListener listener)
                   throws Exception

  Increment (increase the number of) instances of the ServiceBean by one. This will cause the provisioning of a ServiceBean to an available compute resource which meets the operational criteria specified by the ServiceElement.

  Parameters:
    `listener` - A ServiceProvisionListener that will be notified of the result of the increment request
  Throws:
    `Exception` - if any errors occur communicating with the OperationalStringManager, or with the OperationalStringManager's processing of the request

### decrement

    void decrement(boolean destroy)
                   throws Exception

  Decrement (decrease the number of) and remove this ServiceBean instance from the OperationalString.

  Parameters:
    `destroy` - If true, destroy the ServiceBean upon removal, otherwise just remove
  Throws:
    `Exception` - if any errors occur communicating with the OperationalStringManager, or with the OperationalStringManager's processing of the request

### relocate

    void relocate(ServiceProvisionListener listener,
                  Uuid uuid)
                  throws Exception

  Relocate (move) a ServiceBean instance to another compute resource

  Parameters:
    `listener` - A ServiceProvisionListener that will be notified of the result of the relocate request
    `uuid` - The uuid of a `ServiceBeanInstantiator` to relocate to. If null, the OperationalStringManager will determine a suitable resource
  Throws:
    `Exception` - if any errors occur communicating with the OperationalStringManager, or with the OperationalStringManager's processing of the request

### getDiscardManager

    DiscardManager getDiscardManager()

  Get the DiscardManager for the ServiceBean. A ServiceBean must obtain the DiscardManager upon termination. The DiscardManager performs necessary cleanup tasks associated with the termination of a ServiceBean

  Returns:
    DiscardManager

### getOperationalStringManager

    OperationalStringManager getOperationalStringManager()

  Get the OperationalStringManager instance which is managing the OperationalString the ServiceBean is a part of

  Returns:
    The OperationalStringManager instance which is managing the OperationalString the ServiceBean is a part of

### getServiceID

    Uuid getServiceID()

  Get the universally unique identifier for the ServiceBean

  Returns:
    The universally unique identifier for the ServiceBean

### getServiceBeanInstance

    ServiceBeanInstance getServiceBeanInstance()

  Get the ServiceBeanInstance for the ServiceBean

  Returns:
    The ServiceBeanInstance for the ServiceBean

### addListener

    void addListener(ServiceElementChangeListener l)

  Register for notification of ServiceElement changes. The ServiceElementChangeListener will be notified each time the ServiceElement is changed. If the parameter value duplicates (using equals) another element in the set of listeners, no action is taken. If the parameter value is null, a NullPointerException is thrown

  Parameters:
    `l` - A ServiceElementChangeListener instance to add.

### removeListener

    void removeListener(ServiceElementChangeListener l)

  Remove a currently registered ServiceElementChangeListener instance from the set of listeners currently registered with the ServiceBeanManager. If the parameter value is null, or if the parameter value does not exist in the managed set of listeners, no action is taken

  Parameters:
    `l` - A ServiceElementChangeListener instance to remove.

### getNotificationBroadcasterSupport

    NotificationBroadcasterSupport getNotificationBroadcasterSupport()

  Get the class that can be used as the class that sends JMX notifications for the MBean

  Returns:
    A `NotificationBroadcasterSupport`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.