All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.jbi.messaging.MessageExchangeFactory Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
/**
 * @(#) MessageExchangeFactory.java
 *
 * PETALS - PETALS Services Platform.
 * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * -------------------------------------------------------------------------
 * $Id: MessageExchangeFactory.java 221 2006-04-14 12:45:33Z alouis $
 * -------------------------------------------------------------------------
 */

//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//

package javax.jbi.messaging;

/**
 * A message exchange factory is used used to create new instances of
 * {@link MessageExchange}. Service consumers use these factories to create
 * message exchanges when initiating a new service request.
 * 

* Message exchange factories are created using the * {@link javax.jbi.component.ComponentContext} given to the component during * its initialization (see {@link javax.jbi.component.ComponentLifeCycle}). * There are a variety of ways to creating such factories, each of which creates * a context that is used to provide some of the default properties of * {@link MessageExchange} instances created by the factory instances. For * example, a factory can be created for a particular endpoint, ensuring that * all exchanges created by the factory have that endpoint set as the default * endpoint property of the exchange. This allows components to retain factories * as a way of aligning internal processing context with the context contained * in the factory, ensuring that the exchanges created consistently reflect that * context. * * @author JSR208 Expert Group */ public interface MessageExchangeFactory { /** * TODO createExchange find an endpoint for the service at the ME creation * Creates a new MessageExchange instance used to initiate a * service invocation. *

* JBI defines a set of four basic message exchange types, corresponding to * the predefined in-* WSDL 2.0 Message Exchange Patterns. Message exchanges * of any type are created using the DeliveryChannel. * * @param serviceName * the name of the service to be invoked; must be non-null * @param operationName * the name of the operation to be invoked; must be non-null and * non-empty * @return new message exchange, initialized for invoking the given service * and operation; must be non-null * @throws MessagingException * if the given service or operation are not registered with the * NMR. * @throws MessagingException * if the factory was created for a particular interface, and * the given serviceName does not implement that interface. */ public javax.jbi.messaging.MessageExchange createExchange( javax.xml.namespace.QName serviceName, javax.xml.namespace.QName operationName) throws MessagingException; /** * Creates a new MessageExchange instance used to initiate a service * invocation. JBI defines a set of four fundamental message exchange types * which are created using binding and engine delivery channels. This base * met0hod is provided for extensibility, to satisfy the need for * vendor-specific message exchange patterns. The registration and * administration of these patterns is not addressed by JBI. * * @param pattern * message exchange pattern; must be non-null and non-empty * @return new message exchange; must be non-null * @throws MessagingException * specified pattern is not registered to a message exchange * type */ public javax.jbi.messaging.MessageExchange createExchange( java.net.URI pattern) throws MessagingException; /** * Convenience method that creates an In-Only message exchange. * * @return new InOnly message exchange; must be non-null * @throws MessagingException * failed to create exchange */ public javax.jbi.messaging.InOnly createInOnlyExchange() throws MessagingException; /** * Convenience method that creates an In-Optional-Out message exchange. * * @return new InOptionalOut message exchange; must be non-null * @throws MessagingException185 - * failed to create exchange */ public javax.jbi.messaging.InOptionalOut createInOptionalOutExchange() throws MessagingException; /** * Convenience method that creates an In Out message exchange. * * @return new InOut message exchange; must be non-null * @throws MessagingException * failed to create exchange */ public javax.jbi.messaging.InOut createInOutExchange() throws MessagingException; /** * Convenience method that creates a Robust-In-Only message exchange. * * @return new RobustInOnly message exchange; must be non-null * @throws MessagingException185 - * failed to create exchange */ public javax.jbi.messaging.RobustInOnly createRobustInOnlyExchange() throws MessagingException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy