All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jgroups.blocks.mux.Muxer Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 33.0.2.Final
Show newest version
package org.jgroups.blocks.mux;

/**
 * Allows registration/deregistrator of multiplexed handlers by mux id.
 * @author Paul Ferraro
 */
public interface Muxer {

    /**
     * Registers the specified handler to handle messages containing a mux header with the specified mux identifier.
     * @param id a mux id
     * @param handler a handler for the specified id
     */
    void add(short id, T handler);
    
    /**
     * Gets the handler registered under the specified id
     * @param id a mux id
     * @return the handler, or null if no handler is registered under
     *         id
     */
    T get(short id);
    
    /**
     * Unregisters the handler associated with the specifed mux identifier
     * @param id a mux id
     */
    void remove(short id);
    
    /**
     * Gets the handler for messages that have no mux header.
     * 
     * @return the default handler, or null if no default handler
     *         has been set
     */
    T getDefaultHandler();
    
    /**
     * Sets the handler for messages that have no mux header.
     * 
     * @param handler a handler for messages that have no mux header
     */
    void setDefaultHandler(T handler);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy