public interface Muxer<T>
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
void add(short id,
T handler)
id - a mux idhandler - a handler for the specified idT get(short id)
id - a mux idnull if no handler is registered under
idvoid remove(short id)
id - a mux idT getDefaultHandler()
null if no default handler
has been setvoid setDefaultHandler(T handler)
handler - a handler for messages that have no mux header