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.resources.servicecore
Class Joiner

    java.lang.Object
      org.jini.rio.resources.servicecore.Joiner

    public class Joiner

extends Object

A utility that contains a `JoinManager` and provides general utility to set up a service's attribute collection

This class does not provide methods to act on a service's `ServiceRegistration` or duplicate capabilities found in the `JoinManager`. Actions on a service's registration need to be performed through the `JoinManager` contained in this class.

Field Summary
`protected ArrayList<Entry>` | `attrList`
`protected JoinManager` | `joinMgr`

Constructor Summary
`Joiner()`

Method Summary
`void` | `addAttribute(Entry entry)` Add an attribute to the collection of attributes managed by this `Joiner`.
`void` | `addAttributes(Entry[] entries)` Add an array of Entry attributes to the collection of attributes managed by this `Joiner`.
`void` | `asyncJoin(Object proxy, ServiceID sid, Entry[] additionalAttrs, DiscoveryManagement dMgr, LeaseRenewalManager lrm)` Provides a fire and forget join mechanism passing in an instance of `DiscoveryManagement` and `LeaseRenewalManagement` This method that all attributes that have been set and accumulated
`void` | `clearAttributes()` Clears the collection of `Entry` elements from the attribute list
`Entry[]` | `getAttributeCollectionEntries()` Get the current attribute collection.
`DiscoveryManagement` | `getDiscoveryManager()` Get the `DiscoveryManager` for this `Joiner` If the JoinManager is null, this method will rturn null
`JoinManager` | `getJoinManager()` Get the `JoinManager` for this `Joiner`
`void` | `modifyAttributes(Entry[] attrSetTemplates, Entry[] attrSets)` Delegates call to the JoinManager if a JoinManager exists
`void` | `removeAttribute(Entry entry)` Remove an attribute to the collection of attributes managed by this `Joiner`.
`void` | `terminate()` Delegates a termination to the `JoinManager` contained by the `Joiner`

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

Field Detail

### joinMgr

    protected JoinManager joinMgr

### attrList

    protected final ArrayList<Entry> attrList

Constructor Detail

### Joiner

    public Joiner()

Method Detail

### getJoinManager

    public JoinManager getJoinManager()

  Get the `JoinManager` for this `Joiner`

  Returns:
    The JoinManager created by this utility. If a JoinManager has not been created, this method will return null.

### modifyAttributes

    public void modifyAttributes(Entry[] attrSetTemplates,
                                 Entry[] attrSets)

  Delegates call to the JoinManager if a JoinManager exists

  Parameters:
    `attrSetTemplates` - array of Entry used to identify which elements to modify from the service's current set of attributes
    `attrSets` - array of Entry containing the actual modifications to make in the matching sets found using the attrSetTemplates parameter
  See Also:
    `JoinManager.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])`

### getDiscoveryManager

    public DiscoveryManagement getDiscoveryManager()

  Get the `DiscoveryManager` for this `Joiner` If the JoinManager is null, this method will rturn null

  Returns:
    DiscoveryManagement

### addAttribute

    public void addAttribute(Entry entry)

  Add an attribute to the collection of attributes managed by this `Joiner`. This method does not perform attribute additions on the JoinManager, rather it adds attributes to a collection contained in the `Joiner`

  Parameters:
    `entry` - The attribute to add

### addAttributes

    public void addAttributes(Entry[] entries)

  Add an array of Entry attributes to the collection of attributes managed by this `Joiner`. This method does not perform attribute additions on the JoinManager, rather it adds attributes to a collection contained in the `Joiner`

  Parameters:
    `entries` - An array of attributes to add

### removeAttribute

    public void removeAttribute(Entry entry)

  Remove an attribute to the collection of attributes managed by this `Joiner`. This method does not perform attribute removals on the JoinManager, rather it adds attributes to a collection contained in the `Joiner`

  Parameters:
    `entry` - attribute to remove

### getAttributeCollectionEntries

    public Entry[] getAttributeCollectionEntries()

  Get the current attribute collection. This may not represent the attribute list the JoinManager control so use with caution!

  Returns:
    the current attribute collection set for the service

### clearAttributes

    public void clearAttributes()

  Clears the collection of `Entry` elements from the attribute list

### terminate

    public void terminate()

  Delegates a termination to the `JoinManager` contained by the `Joiner`

### asyncJoin

    public void asyncJoin(Object proxy,
                          ServiceID sid,
                          Entry[] additionalAttrs,
                          DiscoveryManagement dMgr,
                          LeaseRenewalManager lrm)
                   throws IOException

  Provides a fire and forget join mechanism passing in an instance of `DiscoveryManagement` and `LeaseRenewalManagement`

  This method that all attributes that have been set and accumulated

  Parameters:
    `proxy` - The service proxy
    `sid` - The ServiceID
    `additionalAttrs` - Additional attributes to add
    `dMgr` - A DiscoveryManagement instance
    `lrm` - A LeaseRenewalManager
  Throws:
    `IOException` - if an exception occurs creating the `JoinManager`
  See Also:
    `JoinManager`

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.