org.jgroups.UpHandler 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).
package org.jgroups;
import org.jgroups.util.MessageBatch;
/**
* Provides a hook to hijack all events received by a certain channel which has installed this UpHandler.
* Client usually never need to implement this interface and it is mostly used by JGroups building blocks.
* @since 2.0
* @author Bela Ban
*/
public interface UpHandler {
UpHandler setLocalAddress(Address a);
Object up(Event evt);
Object up(Message msg);
default void up(MessageBatch batch) {
for(Message msg: batch) {
try {
up(msg);
}
catch(Throwable ignored) {
}
}
}
}