Package 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
Modifier and TypeMethodDescriptionvoidRegisters the specified handler to handle messages containing a mux header with the specified mux identifier.get(short id) Gets the handler registered under the specified idGets the handler for messages that have no mux header.voidremove(short id) Unregisters the handler associated with the specifed mux identifiervoidsetDefaultHandler(T handler) Sets the handler for messages that have no mux header.
-
Method Details
-
add
Registers the specified handler to handle messages containing a mux header with the specified mux identifier.- Parameters:
id- a mux idhandler- a handler for the specified id
-
get
Gets the handler registered under the specified id- Parameters:
id- a mux id- Returns:
- the handler, or
nullif no handler is registered underid
-
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
nullif no default handler has been set
-
setDefaultHandler
Sets the handler for messages that have no mux header.- Parameters:
handler- a handler for messages that have no mux header
-