javax.jbi.messaging
インタフェース DeliveryChannel


public interface DeliveryChannel

Bi-directional communication channel used to interact with the Normalized Message Service.

作成者:
JSR208 Expert Group

メソッドの概要
 MessageExchange accept()
          Blocking call used to service a MessageExchange instance which has been initiated by another component.
 MessageExchange accept(long timeout)
          Identical to accept(), but returns after specified interval even if a message exchange is unavailable.
 void close()
          Closes the delivery channel, halting all message traffic.
 MessageExchangeFactory createExchangeFactory()
          Create a message exchange factory.
 MessageExchangeFactory createExchangeFactory(javax.xml.namespace.QName interfaceName)
          Create a message exchange factory for the given interface name.
 MessageExchangeFactory createExchangeFactory(ServiceEndpoint endpoint)
          Create a message exchange factory for the given endpoint.
 MessageExchangeFactory createExchangeFactoryForService(javax.xml.namespace.QName serviceName)
          Create a message exchange factory for the given service name.
 void send(MessageExchange exchange)
          Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component.
 boolean sendSync(MessageExchange exchange)
          Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component, blocking until the exchange is returned.
 boolean sendSync(MessageExchange exchange, long timeout)
          Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component, blocking until the specified timeout is reached.
 

メソッドの詳細

close

void close()
           throws MessagingException
Closes the delivery channel, halting all message traffic.

例外:
MessagingException - fatal error while closing channel.

createExchangeFactory

MessageExchangeFactory createExchangeFactory()
Create a message exchange factory. This factory will create exchange instances with all appropriate properties set to null.

戻り値:
a message exchange factory

createExchangeFactory

MessageExchangeFactory createExchangeFactory(javax.xml.namespace.QName interfaceName)
Create a message exchange factory for the given interface name.

パラメータ:
interfaceName - name of the interface for which all exchanges created by the returned factory will be set
戻り値:
an exchange factory that will create exchanges for the given interface; must be non-null

createExchangeFactoryForService

MessageExchangeFactory createExchangeFactoryForService(javax.xml.namespace.QName serviceName)
Create a message exchange factory for the given service name.

パラメータ:
serviceName - name of the service for which all exchanges created by the returned factory will be set
戻り値:
an exchange factory that will create exchanges for the given service; must be non-null

createExchangeFactory

MessageExchangeFactory createExchangeFactory(ServiceEndpoint endpoint)
Create a message exchange factory for the given endpoint.

パラメータ:
endpoint - endpoint for which all exchanges created by the returned factory will be set for
戻り値:
an exchange factory that will create exchanges for the given endpoint

accept

MessageExchange accept()
                       throws MessagingException
Blocking call used to service a MessageExchange instance which has been initiated by another component. This method supports concurrent invocation for multi-threaded environments.

戻り値:
mesage exchange instance
例外:
MessagingException - failed to accept

accept

MessageExchange accept(long timeout)
                       throws MessagingException
Identical to accept(), but returns after specified interval even if a message exchange is unavailable.

パラメータ:
timeout - time to wait in milliseconds
戻り値:
mesage exchange instance or null if timeout is reached
例外:
MessagingException - failed to accept

send

void send(MessageExchange exchange)
          throws MessagingException
Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component. This method supports concurrent invocation for multi-threaded environments.

パラメータ:
exchange - message exchange to send
例外:
MessagingException - unable to send exchange

sendSync

boolean sendSync(MessageExchange exchange)
                 throws MessagingException
Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component, blocking until the exchange is returned. This method supports concurrent invocation for multi-threaded environments.

パラメータ:
exchange - message exchange to send
戻り値:
true if the exchange has been processed and returned by the servicing component, false otherwise.
例外:
MessagingException - unable to send exchange

sendSync

boolean sendSync(MessageExchange exchange,
                 long timeout)
                 throws MessagingException
Routes a MessageExchange instance through the Normalized Message Service to the appropriate servicing component, blocking until the specified timeout is reached. This method supports concurrent invocation for multi-threaded environments.

パラメータ:
exchange - message exchange to send
timeout - time to wait in milliseconds
戻り値:
true if the exchange has been processed and returned by the servicing component, false in the case of timeout.
例外:
MessagingException - unable to send exchange


Copyright (C) 1998 - 2012 NEC Corporation. All rights reserved.