org.mule.routing.binding
Class DefaultInterfaceBinding
java.lang.Object
org.mule.routing.AbstractRouter
org.mule.routing.binding.DefaultInterfaceBinding
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, InterfaceBinding, Router
public class DefaultInterfaceBinding
- extends AbstractRouter
- implements InterfaceBinding
outboundRouter
protected OutboundRouter outboundRouter
DefaultInterfaceBinding
public DefaultInterfaceBinding()
route
public MuleMessage route(MuleMessage message,
MuleSession session)
throws MessagingException
- Description copied from interface:
InterfaceBinding
- This method is responsible for routing the Message via the MuleSession. The logic
for this method will change for each type of router depending on expected
behaviour. For example, a MulticastingRouter might just iterate through the
list of assoaciated endpoints sending the message. Another type of router such
as the ExceptionBasedRouter will hit the first endpoint, if it fails try the
second, and so on. Most router implementations will extends the
FilteringOutboundRouter which implements all the common logic need for a
router.
- Specified by:
route
in interface InterfaceBinding
- Parameters:
message
- the message to send via one or more endpoints on this routersession
- the session used to actually send the event
- Returns:
- a result message if any from the invocation. If the synchronous flag
is false a null result will always be returned.
- Throws:
MessagingException
- if any errors occur during the sending of messages- See Also:
FilteringOutboundRouter
,
ExceptionBasedRouter
,
* @since 2.1 the synchronous argument has been removed. Instead use the synchronous attribute of the endpoint
you are dispatching to.
setInterface
public void setInterface(Class interfaceClass)
- Specified by:
setInterface
in interface InterfaceBinding
getInterface
public Class getInterface()
- Specified by:
getInterface
in interface InterfaceBinding
getMethod
public String getMethod()
- Specified by:
getMethod
in interface InterfaceBinding
setMethod
public void setMethod(String methodName)
- Specified by:
setMethod
in interface InterfaceBinding
createProxy
public Object createProxy(Object target)
- Description copied from interface:
InterfaceBinding
- This wires the dynamic proxy to the service object.
- Specified by:
createProxy
in interface InterfaceBinding
setEndpoint
public void setEndpoint(OutboundEndpoint e)
- Specified by:
setEndpoint
in interface InterfaceBinding
getInterfaceClass
public Class getInterfaceClass()
toString
public String toString()
- Overrides:
toString
in class Object
getEndpoint
public OutboundEndpoint getEndpoint()
- Specified by:
getEndpoint
in interface InterfaceBinding
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.