01: package org.jgroups.protocols;
02:
03: import org.jgroups.*;
04: import org.jgroups.stack.LogicalAddress;
05: import org.jgroups.stack.Protocol;
06: import org.jgroups.util.Queue;
07: import org.jgroups.util.QueueClosedException;
08: import org.jgroups.util.Util;
09: import org.apache.commons.logging.Log;
10: import org.apache.commons.logging.LogFactory;
11:
12: import java.io.*;
13: import java.net.*;
14: import java.util.*;
15:
16: interface Receiver {
17:
18: /** Called when data has been received on a socket. When the callback returns, the buffer will be
19: * reused: therefore, if <code>buf</code> must be processed on a separate thread, it needs to be copied.
20: * This method might be called concurrently by multiple threads, so it has to be reentrant
21: * @param packet
22: */
23: void receive(DatagramPacket packet);
24: }
|