org.apache.geronimo.messaging.interceptors
Class MsgOutDispatcher

java.lang.Object
  extended byorg.apache.geronimo.messaging.interceptors.MsgOutDispatcher
All Implemented Interfaces:
MsgOutInterceptor

public class MsgOutDispatcher
extends Object
implements MsgOutInterceptor

Dispatches Msgs to Msg output based on their headers.

Version:
$Revision: 1.1 $ $Date: 2004/05/11 12:06:40 $

Constructor Summary
MsgOutDispatcher(Object aHeaderKey)
          Dispatches the received Msgs to the registered Msg outputs based on the value of the header having the key aHeaderKey.
 
Method Summary
 void push(Msg aMsg)
          Dispatches the Msg.
 void register(Object aHeader, MsgOutInterceptor anOut)
          Registers a header value.
 void unregister(Object aHeader)
          Unregisters a header value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgOutDispatcher

public MsgOutDispatcher(Object aHeaderKey)
Dispatches the received Msgs to the registered Msg outputs based on the value of the header having the key aHeaderKey.

Parameters:
aHeaderKey - Header key.
Method Detail

register

public void register(Object aHeader,
                     MsgOutInterceptor anOut)
Registers a header value.

Parameters:
aHeader - Header value.
anOut - Msgs having the specified header value are dispatched to this Msg output.

unregister

public void unregister(Object aHeader)
Unregisters a header value.

Parameters:
aHeader - Header to be unregistered.

push

public void push(Msg aMsg)
Dispatches the Msg.

Specified by:
push in interface MsgOutInterceptor
Parameters:
aMsg - Msg to be dispatched.
Throws:
RuntimeException - Indicates that no Msg output is registered for this Msg.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.