org.apache.servicemix.common
Class EndpointDeliveryChannel

java.lang.Object
  extended by org.apache.servicemix.common.EndpointDeliveryChannel
All Implemented Interfaces:
javax.jbi.messaging.DeliveryChannel

public class EndpointDeliveryChannel
extends java.lang.Object
implements javax.jbi.messaging.DeliveryChannel

This class is a wrapper around an existing DeliveryChannel that will be given to service engine endpoints so that they are able to send messages and to interact with the JBI container.

Author:
gnodet

Constructor Summary
EndpointDeliveryChannel(javax.jbi.component.ComponentContext context)
           
EndpointDeliveryChannel(Endpoint endpoint)
           
 
Method Summary
 javax.jbi.messaging.MessageExchange accept()
           
 javax.jbi.messaging.MessageExchange accept(long timeout)
           
 void close()
           
 javax.jbi.messaging.MessageExchangeFactory createExchangeFactory()
           
 javax.jbi.messaging.MessageExchangeFactory createExchangeFactory(javax.xml.namespace.QName interfaceName)
           
 javax.jbi.messaging.MessageExchangeFactory createExchangeFactory(javax.jbi.servicedesc.ServiceEndpoint endpoint)
           
 javax.jbi.messaging.MessageExchangeFactory createExchangeFactoryForService(javax.xml.namespace.QName serviceName)
           
protected  Endpoint getEndpoint()
           
protected  void handleExchange(javax.jbi.messaging.MessageExchange exchange, boolean add)
           
protected  void prepareExchange(javax.jbi.messaging.MessageExchange exchange)
           
 void send(javax.jbi.messaging.MessageExchange exchange)
           
 boolean sendSync(javax.jbi.messaging.MessageExchange exchange)
           
 boolean sendSync(javax.jbi.messaging.MessageExchange exchange, long timeout)
           
static void setEndpoint(Endpoint endpoint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointDeliveryChannel

public EndpointDeliveryChannel(Endpoint endpoint)
                        throws javax.jbi.messaging.MessagingException
Throws:
javax.jbi.messaging.MessagingException

EndpointDeliveryChannel

public EndpointDeliveryChannel(javax.jbi.component.ComponentContext context)
                        throws javax.jbi.messaging.MessagingException
Throws:
javax.jbi.messaging.MessagingException
Method Detail

accept

public javax.jbi.messaging.MessageExchange accept()
                                           throws javax.jbi.messaging.MessagingException
Specified by:
accept in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

accept

public javax.jbi.messaging.MessageExchange accept(long timeout)
                                           throws javax.jbi.messaging.MessagingException
Specified by:
accept in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

close

public void close()
           throws javax.jbi.messaging.MessagingException
Specified by:
close in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

createExchangeFactory

public javax.jbi.messaging.MessageExchangeFactory createExchangeFactory()
Specified by:
createExchangeFactory in interface javax.jbi.messaging.DeliveryChannel

createExchangeFactory

public javax.jbi.messaging.MessageExchangeFactory createExchangeFactory(javax.xml.namespace.QName interfaceName)
Specified by:
createExchangeFactory in interface javax.jbi.messaging.DeliveryChannel

createExchangeFactory

public javax.jbi.messaging.MessageExchangeFactory createExchangeFactory(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Specified by:
createExchangeFactory in interface javax.jbi.messaging.DeliveryChannel

createExchangeFactoryForService

public javax.jbi.messaging.MessageExchangeFactory createExchangeFactoryForService(javax.xml.namespace.QName serviceName)
Specified by:
createExchangeFactoryForService in interface javax.jbi.messaging.DeliveryChannel

send

public void send(javax.jbi.messaging.MessageExchange exchange)
          throws javax.jbi.messaging.MessagingException
Specified by:
send in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

sendSync

public boolean sendSync(javax.jbi.messaging.MessageExchange exchange,
                        long timeout)
                 throws javax.jbi.messaging.MessagingException
Specified by:
sendSync in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

sendSync

public boolean sendSync(javax.jbi.messaging.MessageExchange exchange)
                 throws javax.jbi.messaging.MessagingException
Specified by:
sendSync in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

prepareExchange

protected void prepareExchange(javax.jbi.messaging.MessageExchange exchange)
                        throws javax.jbi.messaging.MessagingException
Throws:
javax.jbi.messaging.MessagingException

handleExchange

protected void handleExchange(javax.jbi.messaging.MessageExchange exchange,
                              boolean add)
                       throws javax.jbi.messaging.MessagingException
Throws:
javax.jbi.messaging.MessagingException

getEndpoint

protected Endpoint getEndpoint()

setEndpoint

public static void setEndpoint(Endpoint endpoint)


Copyright © 2005-2012 FuseSource. All Rights Reserved.