Jive Messenger 2.2.2 Javadoc

org.jivesoftware.messenger
Class PacketRouter

java.lang.Object
  extended by org.jivesoftware.messenger.container.BasicModule
      extended by org.jivesoftware.messenger.PacketRouter
All Implemented Interfaces:
Module

public class PacketRouter
extends BasicModule

An uber router that can handle any packet type.

The interface is provided primarily as a convenience for services that must route all packet types (e.g. s2s routing, e2e encryption, etc).

Author:
Iain Shigeoka

Constructor Summary
PacketRouter()
          Constructs a packet router.
 
Method Summary
 void initialize(XMPPServer server)
          Initializes the basic module.
 void route(IQ packet)
           
 void route(Message packet)
           
 void route(Packet packet)
          Routes the given packet based on packet recipient and sender.
 void route(Presence packet)
           
 
Methods inherited from class org.jivesoftware.messenger.container.BasicModule
destroy, getName, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketRouter

public PacketRouter()
Constructs a packet router.

Method Detail

route

public void route(Packet packet)
Routes the given packet based on packet recipient and sender. The router defers actual routing decisions to other classes.

Warning

Be careful to enforce concurrency DbC of concurrent by synchronizing any accesses to class resources.

Parameters:
packet - The packet to route

route

public void route(IQ packet)

route

public void route(Message packet)

route

public void route(Presence packet)

initialize

public void initialize(XMPPServer server)
Description copied from class: BasicModule

Initializes the basic module.

Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.

Specified by:
initialize in interface Module
Overrides:
initialize in class BasicModule
Parameters:
server - the server hosting this module.

Jive Messenger 2.2.2 Javadoc

Copyright © 1999-2004 Jive Software.