01: /**
02: * $RCSfile: $
03: * $Revision: $
04: * $Date: $
05: *
06: * Copyright (C) 2007 Jive Software. All rights reserved.
07: *
08: * This software is published under the terms of the GNU Public License (GPL),
09: * a copy of which is included in this distribution.
10: */package org.jivesoftware.openfire;
11:
12: import org.xmpp.packet.JID;
13: import org.xmpp.packet.Message;
14: import org.xmpp.packet.Packet;
15:
16: /**
17: * A RemotePacketRouter is responsible for deliverying packets to entities hosted
18: * in remote nodes of the cluster.
19: *
20: * @author Gaston Dombiak
21: */
22: public interface RemotePacketRouter {
23:
24: /**
25: * Routes packet to specified receipient hosted in the specified node.
26: *
27: * @param nodeID the ID of the node hosting the receipient.
28: * @param receipient the target entity that will get the packet.
29: * @param packet the packet to send.
30: * @return true if the remote node was found.
31: */
32: boolean routePacket(byte[] nodeID, JID receipient, Packet packet);
33:
34: /**
35: * Brodcasts the specified message to all local client sessions of each cluster node.
36: * The current cluster node is not going to be included.
37: *
38: * @param packet the message to broadcast.
39: */
40: void broadcastPacket(Message packet);
41: }
|