Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgroups.blocks.mux
Interface Muxer<T>

All Known Implementing Classes:
  MuxUpHandler

    public interface Muxer<T>

Allows registration/deregistrator of multiplexed handlers by mux id.

Author:
  Paul Ferraro

Method Summary
`void` | `add(short id, T handler)` Registers the specified handler to handle messages containing a mux header with the specified mux identifier.
`T` | `get(short id)` Gets the handler registered under the specified id
`T` | `getDefaultHandler()` Gets the handler for messages that have no mux header.
`void` | `remove(short id)` Unregisters the handler associated with the specifed mux identifier
`void` | `setDefaultHandler(T handler)` Sets the handler for messages that have no mux header.

Method Detail

### add

    void add(short id,
             T handler)

  Registers the specified handler to handle messages containing a mux header with the specified mux identifier.

  Parameters:
    `id` - a mux id
    `handler` - a handler for the specified id

### get

    T get(short id)

  Gets the handler registered under the specified id

  Parameters:
    `id` - a mux id
  Returns:
    the handler, or `null` if no handler is registered under `id`

### remove

    void remove(short id)

  Unregisters the handler associated with the specifed mux identifier

  Parameters:
    `id` - a mux id

### getDefaultHandler

    T getDefaultHandler()

  Gets the handler for messages that have no mux header.

  Returns:
    the default handler, or `null` if no default handler has been set

### setDefaultHandler

    void setDefaultHandler(T handler)

  Sets the handler for messages that have no mux header.

  Parameters:
    `handler` - a handler for messages that have no mux header

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.