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.provision
Interface ServiceBeanInstantiator

All Known Subinterfaces:
  Cybernode

    public interface ServiceBeanInstantiator

The ServiceBeanInstantiator specifies the semantics for a service that provides instantiation and update support for services described by a `ServiceElement` object. The ServiceBeanInstantiator additionally provides semantics allowing clients to obtain information about services that have been started and are currently running using the `ServiceStatement` and `ServiceRecord`

Method Summary
`Uuid` | `getInstantiatorUuid()` Get the Uuid which uniquely identifies the ServiceBeanInstantiator
`String` | `getName()` Get a name for the ServiceBeanInstantiator
`ServiceBeanInstance[]` | `getServiceBeanInstances(ServiceElement element)` Get all `ServiceBeanInstance` objects for a `ServiceElement`
`ServiceRecord[]` | `getServiceRecords(int filter)` This method returns an array of `ServiceRecord` objects which contain information about the service instances this ServiceBeanInstantiator has instantiated.
`ServiceStatement` | `getServiceStatement(ServiceElement sElem)` This method returns a `ServiceStatement` for the `ServiceElement`
`ServiceStatement[]` | `getServiceStatements()` This method returns an array of `ServiceStatement` objects which contain information about the ServiceBean instances this ServiceBeanInstantiator has instantiated.
`ServiceBeanInstance` | `instantiate(ServiceProvisionEvent event)` This method is invoked as a result of event registration to `ProvisionManager` instances.
`void` | `update(ServiceElement[] sElements, OperationalStringManager opStringMgr)` Invoked to update instantiated ServiceBean instances of changes in their `ServiceElement` objects and `OperationalStringManager` references.

Method Detail

### instantiate

    ServiceBeanInstance instantiate(ServiceProvisionEvent event)
                                    throws JSBInstantiationException,
                                           UnknownEventException,
                                           RemoteException

  This method is invoked as a result of event registration to `ProvisionManager` instances. The ServiceBeanInstantiator will register for `ServiceProvisionEvent` notifications.

  Parameters:
    `event` - - The ServiceProvisionEvent
  Returns:
    ServiceBeanInstance- A ServiceBeanInstance object
  Throws:
    `JSBInstantiationException` - if there are problems loading or instantiating the ServiceBean
    `UnknownEventException` - if it does not recognize the Event ID
    `RemoteException` - if communication errors occur

### update

    void update(ServiceElement[] sElements,
                OperationalStringManager opStringMgr)
                throws RemoteException

  Invoked to update instantiated ServiceBean instances of changes in their `ServiceElement` objects and `OperationalStringManager` references. This method invocation is typically triggered when the `OperationalString` has been updated, or the OperationalStringManager has been changed, and provides somewhat of a batch update mechanism.

  The ServiceBeanInstantiator will match the array of `ServiceElement` objects to instantiated service instances. For each match, the instance will have it's ServiceElement updated with the provided ServiceElement object.

  ServiceElement updates can trigger changes in running services. ServiceElement attributes (and contained class attributes) which may trigger behavior changes as follows:

  1. Additions/removals or changes to declared `SLA` instances
  2. Additions/removals or changes to declared `Association` instances
  3. Additions/removals to declared parameters

  Parameters:
    `sElements` - Array of ServiceElement instances to update
    `opStringMgr` - The OperationalStringManager which is performing the update
  Throws:
    `RemoteException` - If communication errors happen

### getServiceStatements

    ServiceStatement[] getServiceStatements()
                                            throws RemoteException

  This method returns an array of `ServiceStatement` objects which contain information about the ServiceBean instances this ServiceBeanInstantiator has instantiated.

  Returns:
    An array of ServiceStatement objects. The array will be empty if no ServiceStatement instances are found
  Throws:
    `RemoteException` - If communication errors happen

### getServiceStatement

    ServiceStatement getServiceStatement(ServiceElement sElem)
                                         throws RemoteException

  This method returns a `ServiceStatement` for the `ServiceElement`

  Parameters:
    `sElem` - The ServiceElement to get the ServiceStatement for. If this argument should is null, an IllegalArgumentException is thrown.
  Returns:
    A ServiceStatement for the ServiceElement. If the ServiceElement has never been instantiated by the ServiceBeanInstantiator, a null is returned
  Throws:
    `RemoteException` - If communication errors happen

### getServiceRecords

    ServiceRecord[] getServiceRecords(int filter)
                                      throws RemoteException

  This method returns an array of `ServiceRecord` objects which contain information about the service instances this ServiceBeanInstantiator has instantiated.

  Parameters:
    `filter` - A filter for ServiceRecord retrieval. ServiceRecord instances will be returned if the ServiceRecord type matches the filter type. The filter can be either ServiceRecord.ACTIVE_SERVICE_RECORD or ServiceRecord.INACTIVE_SERVICE_RECORD.
  Returns:
    An array of ServiceRecord objects. The array will be empty if no ServiceRecord instances are found which match the filter
  Throws:
    `RemoteException` - If communication errors happen

### getServiceBeanInstances

    ServiceBeanInstance[] getServiceBeanInstances(ServiceElement element)
                                                  throws RemoteException

  Get all `ServiceBeanInstance` objects for a `ServiceElement`

  Parameters:
    `element` - The ServiceElement to obtain ServiceBeanInstance objects for.
  Returns:
    An array of ServiceBeanInstance objects. If the `element` parameter is `null` return all ServiceBeanInstance objects. A new array is allocated each time. If there are no matching ServiceBeanInstance objects a zero-length array is returned
  Throws:
    `RemoteException` - If communication errors happen

### getName

    String getName()
                   throws RemoteException

  Get a name for the ServiceBeanInstantiator

  Returns:
    A human readable name for the ServiceBeanInstantiator
  Throws:
    `RemoteException` - If communication errors happen

### getInstantiatorUuid

    Uuid getInstantiatorUuid()
                             throws RemoteException

  Get the Uuid which uniquely identifies the ServiceBeanInstantiator

  Returns:
    The Uuid of the ServiceBeanInstantiator
  Throws:
    `RemoteException` - If communication errors happen

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.