org.ow2.petals.jbi.messaging.exchange
Class DeliveryChannelImpl

java.lang.Object
  extended by org.ow2.petals.jbi.messaging.exchange.DeliveryChannelImpl
All Implemented Interfaces:
javax.jbi.messaging.DeliveryChannel

public class DeliveryChannelImpl
extends java.lang.Object
implements DeliveryChannel

Author:
Adrien LOUIS - EBM WebSourcing, ofabre - EBM Websourcing, rnaudin - EBM Websourcing

Field Summary
protected  boolean opened
           
 
Fields inherited from interface org.ow2.petals.jbi.messaging.exchange.DeliveryChannel
PROPERTY_SENDSYNC
 
Constructor Summary
DeliveryChannelImpl(ComponentContext context)
          Constructor
 
Method Summary
 javax.jbi.messaging.MessageExchange accept()
           
 javax.jbi.messaging.MessageExchange accept(long timeoutMS)
           
 void checkDeliveryChannelIsOpened()
          Check if the DeliveryChannel is opened
 void close()
          This method wake up all threads that are waiting for a message.
 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)
           
 boolean isOpened()
          Check is the delivery channel is open
 void send(javax.jbi.messaging.MessageExchange exchange)
           
 boolean sendSync(javax.jbi.messaging.MessageExchange exchange)
           
 boolean sendSync(javax.jbi.messaging.MessageExchange exchange, long timeoutMS)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opened

protected boolean opened
Constructor Detail

DeliveryChannelImpl

public DeliveryChannelImpl(ComponentContext context)
Constructor

Parameters:
context -
router -
logger -
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 timeoutMS)
                                           throws javax.jbi.messaging.MessagingException
Specified by:
accept in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException

checkDeliveryChannelIsOpened

public void checkDeliveryChannelIsOpened()
                                  throws javax.jbi.messaging.MessagingException
Check if the DeliveryChannel is opened

Throws:
javax.jbi.messaging.MessagingException

close

public void close()
           throws javax.jbi.messaging.MessagingException
This method wake up all threads that are waiting for a message. This method deregister all endpoints for this component.

Specified by:
close in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException
See Also:
DeliveryChannel.close()

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

isOpened

public boolean isOpened()
Description copied from interface: DeliveryChannel
Check is the delivery channel is open

Returns:

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)
                 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,
                        long timeoutMS)
                 throws javax.jbi.messaging.MessagingException
Specified by:
sendSync in interface javax.jbi.messaging.DeliveryChannel
Throws:
javax.jbi.messaging.MessagingException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.