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.associations.strategy
Class FailOver<T>

    java.lang.Object
      org.jini.rio.associations.strategy.AbstractServiceSelectionStrategy<T>
          org.jini.rio.associations.strategy.FailOver<T>

All Implemented Interfaces:
  ServiceSelectionStrategy<T>, AssociationListener<T>

    public class FailOver<T>

extends AbstractServiceSelectionStrategy<T>

Returns the first service in the `Association`. If the underlying service is removed (as determined by the `FaultDetectionHandler`), the next available service is returned. This service selection strategy will always prefer local services over remote services and sorts the service list collection returned from the `Association` accordingly, using the `net.jini.lookup.entry.Host` entry attribute

Field Summary

Fields inherited from class org.jini.rio.associations.strategy.AbstractServiceSelectionStrategy
`association`

Constructor Summary
`FailOver()`

Method Summary
`void` | `broken(Association<T> association, T service)` Notify the AssociationListener that an Association is broken.
`void` | `changed(Association<T> association, T service)` Notify the AssociationListener that a service endpoint has changed
`void` | `discovered(Association<T> association, T service)` Notify the AssociationListener that an Association has been discovered
`T` | `getService()` Select a service for invocation
`void` | `setAssociation(Association<T> association)` Set the association

Methods inherited from class org.jini.rio.associations.strategy.AbstractServiceSelectionStrategy
`getAssociation, terminate`

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

Constructor Detail

### FailOver

    public FailOver()

Method Detail

### getService

    public T getService()

  Description copied from interface: `ServiceSelectionStrategy`
  Select a service for invocation

  Specified by:
    `getService` in interface `ServiceSelectionStrategy<T>`
  Specified by:
    `getService` in class `AbstractServiceSelectionStrategy<T>`
  Returns:
    The proxy for a service

### setAssociation

    public void setAssociation(Association<T> association)

  Description copied from interface: `ServiceSelectionStrategy`
  Set the association

  Specified by:
    `setAssociation` in interface `ServiceSelectionStrategy<T>`
  Overrides:
    `setAssociation` in class `AbstractServiceSelectionStrategy<T>`
  Parameters:
    `association` - The association

### discovered

    public void discovered(Association<T> association,
                           T service)

  Description copied from interface: `AssociationListener`
  Notify the AssociationListener that an Association has been discovered

  Specified by:
    `discovered` in interface `AssociationListener<T>`
  Overrides:
    `discovered` in class `AbstractServiceSelectionStrategy<T>`
  Parameters:
    `association` - The Association
    `service` - The associated service that has been discovered

### changed

    public void changed(Association<T> association,
                        T service)

  Description copied from interface: `AssociationListener`
  Notify the AssociationListener that a service endpoint has changed

  Specified by:
    `changed` in interface `AssociationListener<T>`
  Overrides:
    `changed` in class `AbstractServiceSelectionStrategy<T>`
  Parameters:
    `association` - The Association
    `service` - The service that was removed, changing the endpoint

### broken

    public void broken(Association<T> association,
                       T service)

  Description copied from interface: `AssociationListener`
  Notify the AssociationListener that an Association is broken. If the Association type is requires, the AssociationManagement object will unadvertise the ServiceBean using the ServiceBean instances ServiceBeanControl interface unless the unadvertiseOnBroken is set to false

  Specified by:
    `broken` in interface `AssociationListener<T>`
  Overrides:
    `broken` in class `AbstractServiceSelectionStrategy<T>`
  Parameters:
    `association` - The Association.
    `service` - The service that was removed, causing the Association to be broken

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.