org.mule.routing.inbound
Class DefaultInboundRouterCollection

java.lang.Object
  extended by org.mule.routing.AbstractRouterCollection
      extended by org.mule.routing.inbound.DefaultInboundRouterCollection
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, InboundRouterCollection, RouterCollection

public class DefaultInboundRouterCollection
extends AbstractRouterCollection
implements InboundRouterCollection

DefaultInboundRouterCollection is a collection of routers that will be invoked when an event is received. It is responsible for managing a collection of routers and also executing the routing logic. Each router must match against the current event for the event to be routed.


Field Summary
 
Fields inherited from class org.mule.routing.AbstractRouterCollection
logger, matchAll, muleContext, routers
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
DefaultInboundRouterCollection()
           
 
Method Summary
 void addEndpoint(ImmutableEndpoint endpoint)
           
 void addRouter(InboundRouter router)
           
 void dispatch(MuleEvent event)
           
 ImmutableEndpoint getEndpoint(String name)
           
 List getEndpoints()
           
 void initialise()
          Method used to perform any initialisation work.
 boolean removeEndpoint(ImmutableEndpoint endpoint)
           
 InboundRouter removeRouter(InboundRouter router)
           
 MuleMessage route(MuleEvent event)
           
 MuleMessage send(MuleEvent event)
           
 void setEndpoints(List endpoints)
           
 
Methods inherited from class org.mule.routing.AbstractRouterCollection
addRouter, dispose, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setMuleContext, setRouters, setStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.routing.RouterCollection
addRouter, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setRouters, setStatistics
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Constructor Detail

DefaultInboundRouterCollection

public DefaultInboundRouterCollection()
Method Detail

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Overrides:
initialise in class AbstractRouterCollection
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

route

public MuleMessage route(MuleEvent event)
                  throws MessagingException
Specified by:
route in interface InboundRouterCollection
Throws:
MessagingException

dispatch

public void dispatch(MuleEvent event)
              throws MuleException
Throws:
MuleException

send

public MuleMessage send(MuleEvent event)
                 throws MuleException
Throws:
MuleException

addRouter

public void addRouter(InboundRouter router)
Specified by:
addRouter in interface InboundRouterCollection

removeRouter

public InboundRouter removeRouter(InboundRouter router)
Specified by:
removeRouter in interface InboundRouterCollection

addEndpoint

public void addEndpoint(ImmutableEndpoint endpoint)
Specified by:
addEndpoint in interface InboundRouterCollection

removeEndpoint

public boolean removeEndpoint(ImmutableEndpoint endpoint)
Specified by:
removeEndpoint in interface InboundRouterCollection

getEndpoints

public List getEndpoints()
Specified by:
getEndpoints in interface InboundRouterCollection

setEndpoints

public void setEndpoints(List endpoints)
Specified by:
setEndpoints in interface InboundRouterCollection

getEndpoint

public ImmutableEndpoint getEndpoint(String name)
Specified by:
getEndpoint in interface InboundRouterCollection
Parameters:
name - the Endpoint identifier
Returns:
the Endpoint or null if the endpointUri is not registered
See Also:
InboundRouterCollection


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.