Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.4 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire
Class MessageRouter

    java.lang.Object
      org.jivesoftware.openfire.container.BasicModule
          org.jivesoftware.openfire.MessageRouter

All Implemented Interfaces:
  Module

    public class MessageRouter

extends BasicModule

Route message packets throughout the server.

Routing is based on the recipient and sender addresses. The typical packet will often be routed twice, once from the sender to some internal server component for handling or processing, and then back to the router to be delivered to it's final destination.

Author:
  Iain Shigeoka

Constructor Summary
`MessageRouter()` Constructs a message router.

Method Summary
`void` | `initialize(XMPPServer server)` Initializes the basic module.
`void` | `route(Message packet)` Performs the actual packet routing.
`void` | `routingFailed(JID receipient, Packet packet)` Notification message indicating that a packet has failed to be routed to the receipient.

Methods inherited from class org.jivesoftware.openfire.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

### MessageRouter

    public MessageRouter()

  Constructs a message router.

Method Detail

### route

    public void route(Message packet)

  Performs the actual packet routing.

  You routing is considered 'quick' and implementations may not take excessive amounts of time to complete the routing. If routing will take a long amount of time, the actual routing should be done in another thread so this method returns quickly.

  ## Warning

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

  Parameters:
    `packet` - The packet to route
  Throws:
    `NullPointerException` - If the packet is null

### 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.

### routingFailed

    public void routingFailed(JID receipient,
                              Packet packet)

  Notification message indicating that a packet has failed to be routed to the receipient.

  Parameters:
    `receipient` - address of the entity that failed to receive the packet.
    `packet` - Message packet that failed to be sent to the receipient.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.4 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Jive Software.