KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > PacketDeliverer


1 /**
2  * $RCSfile: PacketDeliverer.java,v $
3  * $Revision: 1.6 $
4  * $Date: 2005/04/04 06:36:48 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.messenger;
13
14 import org.xmpp.packet.Packet;
15 import org.jivesoftware.messenger.auth.UnauthorizedException;
16
17 /**
18  * Delivers packets to locally connected streams. This is the opposite
19  * of the packet transporter.
20  *
21  * @author Iain Shigeoka
22  */

23 public interface PacketDeliverer {
24
25     /**
26      * Delivers the given packet based on packet recipient and sender. The
27      * deliverer defers actual routing decisions to other classes.
28      * <h2>Warning</h2>
29      * Be careful to enforce concurrency DbC of concurrent by synchronizing
30      * any accesses to class resources.
31      *
32      * @param packet the packet to route
33      * @throws PacketException if the packet is null or the packet could not be routed.
34      */

35     public void deliver(Packet packet) throws UnauthorizedException, PacketException;
36 }
37
Popular Tags