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 AbstractServiceSelectionStrategy<T>

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

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

Direct Known Subclasses:
  FailOver, RoundRobin, Utilization

    public abstract class AbstractServiceSelectionStrategy<T>

extends Object
implements ServiceSelectionStrategy<T>

Boilerplate implementation of the `ServiceSelectionStrategy`.

Field Summary
`protected Association<T>` | `association`

Constructor Summary
`AbstractServiceSelectionStrategy()`

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
`Association<T>` | `getAssociation()`
`abstract T` | `getService()` Select a service for invocation
`void` | `setAssociation(Association<T> association)` Set the association
`void` | `terminate()` Clean up any resources allocated

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

Field Detail

### association

    protected Association<T> association

Constructor Detail

### AbstractServiceSelectionStrategy

    public AbstractServiceSelectionStrategy()

Method Detail

### setAssociation

    public void setAssociation(Association<T> association)

  Description copied from interface: `ServiceSelectionStrategy`
  Set the association

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

### getAssociation

    public Association<T> getAssociation()

### getService

    public abstract T getService()

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

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

### terminate

    public void terminate()

  Description copied from interface: `ServiceSelectionStrategy`
  Clean up any resources allocated

  Specified by:
    `terminate` in interface `ServiceSelectionStrategy<T>`

### 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>`
  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>`
  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>`
  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.