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.qos
Class RelocationPolicyHandler

    java.lang.Object
      org.jini.rio.qos.SLAPolicyHandler
          org.jini.rio.qos.RelocationPolicyHandler

All Implemented Interfaces:
  Remote, ServerProxyTrust, ServiceProvisionListener, ThresholdListener

    public class RelocationPolicyHandler

extends SLAPolicyHandler
implements ServiceProvisionListener, ServerProxyTrust

The RelocationPolicyHandler will inform the OperationalStringManager to relocate the ServiceBean that uses this policy handler. The RelocationPolicyHandler will look for attributes set that can control it's operational behavior.

The RelocationPolicyHandler supports the following configuration entries; where each configuration entry name is associated with the component name org.jini.rio.qos.RelocationPolicyHandler

- SendRemoteNotification

  Type: | boolean
  Default: | true ``
  Description: | The RelocationPolicyHandler will only send an SLAThresholdEvent if this value is true. An SLAThresholdEvent is sent when defined thresholds have been breached or cleared

- UpperThresholdDampeningFactor

  Type: | long
  Default: | 0 ``
  Description: | The UpperThresholdDampeningFactor is a value in milliseconds that is used to provides a mechanism to avoid thrashing around oscillations when dealing with upper thresholds being crossed.

- LowerThresholdDampeningFactor

  Type: | long
  Default: | 0 ``
  Description: | The LowerThresholdDampeningFactor is a value in milliseconds that is used to provides a mechanism to avoid thrashing around oscillations when dealing with lower thresholds being crossed.

- provisionListenerExporter

  Type: | Exporter
  Default: | A new `BasicJeriExporter` with a `TcpServerEndpoint` created on a random port, a `BasicILFactory`, distributed garbage collection turned off, keep alive on. ``
  Description: | The Exporter used to export the ProvisionListener server. A new exporter is obtained every time a RelocationPolicyHandler needs to export itself.

Field Summary
`static String` | `LOWER_DAMPER` Time to act on lower threshold breaches
`static String` | `RELOCATION_FAILURE` Action that indicates an relocation request has failed
`static String` | `RELOCATION_PENDING` Action that indicates an relocation request is pending
`static String` | `RELOCATION_SUCCEEDED` Action that indicates an relocation request has succeeded.
`static String` | `SEND_NOTIFICATION` Send remote notification as SLAThresholdEvent
`static String` | `UPPER_DAMPER` Time to act on upper threshold breaches

Fields inherited from class org.jini.rio.qos.SLAPolicyHandler
`context, eventSource, initialized, thresholdManager`

Constructor Summary
`RelocationPolicyHandler(SLA sla)` Construct a RelocationPolicyHandler

Method Summary
`void` | `disconnect()` Override parent's method to unexport
`void` | `failed(ServiceElement sElem, boolean resubmitted)` Notify listener that the Service described by the ServiceElement has not been provision succesfully
`String` | `getDescription()` Override parent's method to return description for this SLA Handler
`TrustVerifier` | `getProxyVerifier()` Returns a `TrustVerifier` which can be used to verify that a given proxy to this policy handler can be trusted
`void` | `initialize(Object eventSource, EventHandler eventHandler, ServiceBeanContext context)` Override parent's initialize method to initialize operational attributes
`void` | `notify(Calculable calculable, ThresholdValues thresholdValues, int type)` Notify for a threshold event
`void` | `setThresholdManager(ThresholdManager thresholdManager)` Override parent's method to export the object to the RMI runtime
`void` | `succeeded(ServiceBeanInstance jsbInstance)` Notify listener that the Service described by the ServiceBeanInstance has been provisioned succesfully

Methods inherited from class org.jini.rio.qos.SLAPolicyHandler
`getConfiguration, getEventSource, getID, getSLA, getThresholdManager, notifyListeners, registerListener, sendSLAThresholdEvent, setSendRemoteNotification, unregisterListener, updateSLA`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SEND_NOTIFICATION

    public static final String SEND_NOTIFICATION

  Send remote notification as SLAThresholdEvent

  See Also:
    Constant Field Values

### UPPER_DAMPER

    public static final String UPPER_DAMPER

  Time to act on upper threshold breaches

  See Also:
    Constant Field Values

### LOWER_DAMPER

    public static final String LOWER_DAMPER

  Time to act on lower threshold breaches

  See Also:
    Constant Field Values

### RELOCATION_PENDING

    public static final String RELOCATION_PENDING

  Action that indicates an relocation request is pending

  See Also:
    Constant Field Values

### RELOCATION_FAILURE

    public static final String RELOCATION_FAILURE

  Action that indicates an relocation request has failed

  See Also:
    Constant Field Values

### RELOCATION_SUCCEEDED

    public static final String RELOCATION_SUCCEEDED

  Action that indicates an relocation request has succeeded. The resultant Object in the SLAPolicyEvent will be the proxy of the new service

  See Also:
    Constant Field Values

Constructor Detail

### RelocationPolicyHandler

    public RelocationPolicyHandler(SLA sla)

  Construct a RelocationPolicyHandler

  Parameters:
    `sla` - The SLA for the RelocationPolicyHandler

Method Detail

### getDescription

    public String getDescription()

  Override parent's method to return description for this SLA Handler

  Overrides:
    `getDescription` in class `SLAPolicyHandler`
  Returns:
    The descriptive attribute for this SLA Handler

### setThresholdManager

    public void setThresholdManager(ThresholdManager thresholdManager)

  Override parent's method to export the object to the RMI runtime

  Specified by:
    `setThresholdManager` in interface `ThresholdListener`
  Overrides:
    `setThresholdManager` in class `SLAPolicyHandler`
  Parameters:
    `thresholdManager` - The ThresholdManager to connect to
  See Also:
    `ThresholdListener.setThresholdManager(org.jini.rio.watch.ThresholdManager)`

### disconnect

    public void disconnect()

  Override parent's method to unexport

  Overrides:
    `disconnect` in class `SLAPolicyHandler`

### initialize

    public void initialize(Object eventSource,
                           EventHandler eventHandler,
                           ServiceBeanContext context)

  Override parent's initialize method to initialize operational attributes

  Overrides:
    `initialize` in class `SLAPolicyHandler`
  Parameters:
    `eventSource` - The object to be used as the remote event source
    `eventHandler` - Handler which sends events
    `context` - The ServiceBeanContext

### notify

    public void notify(Calculable calculable,
                       ThresholdValues thresholdValues,
                       int type)

  Description copied from interface: `ThresholdListener`
  Notify for a threshold event

  Specified by:
    `notify` in interface `ThresholdListener`
  Overrides:
    `notify` in class `SLAPolicyHandler`
  Parameters:
    `calculable` - The current metric
    `thresholdValues` - The current thresholds
    `type` - The type of threshold event, breached or cleared
  See Also:
    `ThresholdListener.notify(org.jini.rio.watch.Calculable, org.jini.rio.core.ThresholdValues, int)`

### succeeded

    public void succeeded(ServiceBeanInstance jsbInstance)
                   throws RemoteException

  Description copied from interface: `ServiceProvisionListener`
  Notify listener that the Service described by the ServiceBeanInstance has been provisioned succesfully

  Specified by:
    `succeeded` in interface `ServiceProvisionListener`
  Parameters:
    `jsbInstance` - The ServiceBeanInstance
  Throws:
    `RemoteException` - If communication errors occur
  See Also:
    `ServiceProvisionListener.succeeded(org.jini.rio.core.ServiceBeanInstance)`

### failed

    public void failed(ServiceElement sElem,
                       boolean resubmitted)
                throws RemoteException

  Description copied from interface: `ServiceProvisionListener`
  Notify listener that the Service described by the ServiceElement has not been provision succesfully

  Specified by:
    `failed` in interface `ServiceProvisionListener`
  Parameters:
    `sElem` - The ServiceElement
    `resubmitted` - Whether the Service described by the ServiceElement has been resubmitted for provisioning
  Throws:
    `RemoteException` - If communication errors occur
  See Also:
    `ServiceProvisionListener.failed(org.jini.rio.core.ServiceElement, boolean)`

### getProxyVerifier

    public TrustVerifier getProxyVerifier()

  Returns a `TrustVerifier` which can be used to verify that a given proxy to this policy handler can be trusted

  Specified by:
    `getProxyVerifier` in interface `ServerProxyTrust`

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.