Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 23030 invoked by uid 500); 26 Oct 2002 21:46:56 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 23021 invoked by uid 500); 26 Oct 2002 21:46:55 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Date: 26 Oct 2002 21:46:47 -0000 Message-ID: <20021026214647.64140.qmail@icarus.apache.org> From: jmsnell@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/xmls targets.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jmsnell 2002/10/26 14:46:47 Modified: java build.xml java/xmls targets.xml Added: java/src/org/apache/axis/ime MessageExchangeStatusListener.java MessageExchangeReceiveListener.java MessageExchange.java MessageExchangeCorrelatorService.java MessageExchangeContext.java MessageExchangeConstants.java ConfigurableMessageExchange.java MessageExchangeLifecycle.java MessageExchangeStatus.java MessageExchangeContextListener.java MessageChannel.java MessageExchangeFactory.java ConfigurableMessageExchangeFactory.java MessageExchangeCorrelator.java MessageExchangeFaultListener.java Log: Initial Commit of the Axis Internal Message Exchange (AIME) interfaces. By default, the build will skip the org.apache.axis.ime package. To compile the org.apache.axis.ime package, set the compileime environment variable to true then compile as normal. Revision Changes Path 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeStatusListener.java Index: MessageExchangeStatusListener.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeStatusListener extends Serializable { public void onStatus( MessageExchangeCorrelator correlator, MessageExchangeStatus status); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeReceiveListener.java Index: MessageExchangeReceiveListener.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; import org.apache.axis.MessageContext; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeReceiveListener extends Serializable { public void onReceive( MessageExchangeCorrelator correlator, MessageContext context); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchange.java Index: MessageExchange.java =================================================================== package org.apache.axis.ime; import org.apache.axis.AxisFault; import org.apache.axis.MessageContext; /** * Represents the boundary interface through which messages * are exchanged. This interface supports both push and pull * models for receiving inbound messages. * * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchange { /** * Send an outbound message. (Impl's of this method * need to create a new MessageExchangeCorrelator and * put it into the MessageContext if one does not already * exist.) */ public MessageExchangeCorrelator send( MessageContext context) throws AxisFault; /** * Will attempt to cancel the outbound MessageExchange * process for a given message context. Returns true if * an only if the MessageContext was canceled. A false * response indicates that the MessageContext could not * be removed from the outbound channel for whatever * reason. */ public MessageContext cancel( MessageExchangeCorrelator correlator) throws AxisFault; /** * Waits indefinitely for a message to be received */ public MessageContext receive() throws AxisFault; /** * Waits the specified amount of time for a message to * be received */ public MessageContext receive( long timeout) throws AxisFault; /** * Will instruct the MessageExchange provider to * wait for a message to be received. */ public void startListening(); /** * Will instruct the MessageExchange provider to * wait for a specific MessageExchangeCorrelator */ public void startListening( MessageExchangeCorrelator correlator); /** * Will instruct the MessageExchange provider to * stop listening */ public void stopListening(); /** * Synchronized send and receive */ public MessageContext sendAndReceive( MessageContext context) throws AxisFault; /** * Synchronized send and receive with timeout */ public MessageContext sendAndReceive( MessageContext context, long timeout) throws AxisFault; /** * Allows applications to listen for changes to * the current disposition of the MessageExchange operation * (push model) */ public void setMessageExchangeStatusListener( MessageExchangeStatusListener listener) throws AxisFault; /** * Allows applications to listen for inbound messages * (push model) */ public void setMessageExchangeReceiveListener( MessageExchangeReceiveListener listener) throws AxisFault; /** * Allows applications to listen for faults/exceptions * (push model) */ public void setMessageExchangeFaultListener( MessageExchangeFaultListener listener) throws AxisFault; /** * Allows MessageExchange consumers low level access * to the Send message channel */ public MessageChannel getSendChannel(); /** * Allows MessageExchange consumers low level access * to the Receive message channel */ public MessageChannel getReceiveChannel(); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeCorrelatorService.java Index: MessageExchangeCorrelatorService.java =================================================================== package org.apache.axis.ime; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeCorrelatorService { public void put( MessageExchangeCorrelator correlator, MessageExchangeContext context); public MessageExchangeContext get( MessageExchangeCorrelator correlator); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeContext.java Index: MessageExchangeContext.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; import org.apache.axis.MessageContext; /** * Note: the only challenge with making this class serializable * is that org.apache.axis.MessageContext is currently NOT * serializable. MessageContext needs to change in order to * take advantage of persistent Channels and CorrelatorServices * * For thread safety, instances of this class are immutable * * @author James M Snell (jasnell@us.ibm.com) */ public final class MessageExchangeContext implements Serializable { public static MessageExchangeContext newInstance( MessageExchangeCorrelator correlator, MessageExchangeStatusListener statusListener, MessageExchangeReceiveListener receiveListener, MessageExchangeFaultListener faultListener, MessageContext context) { MessageExchangeContext mectx = new MessageExchangeContext(); mectx.correlator = correlator; mectx.statusListener = statusListener; mectx.receiveListener = receiveListener; mectx.faultListener = faultListener; mectx.context = context; return mectx; } protected MessageExchangeCorrelator correlator; protected MessageExchangeStatusListener statusListener; protected MessageExchangeReceiveListener receiveListener; protected MessageExchangeFaultListener faultListener; protected MessageContext context; protected MessageExchangeContext() {} public MessageExchangeCorrelator getMessageExchangeCorrelator() { return this.correlator; } public MessageExchangeReceiveListener getMessageExchangeReceiveListener() { return this.receiveListener; } public MessageExchangeStatusListener getMessageExchangeStatusListener() { return this.statusListener; } public MessageExchangeFaultListener getMessageExchangeFaultListener() { return this.faultListener; } public MessageContext getMessageContext() { return this.context; } } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeConstants.java Index: MessageExchangeConstants.java =================================================================== package org.apache.axis.ime; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeConstants { //** MessageContext properties **// /** * Identifies the MessageExchangeCorrelator property * within the MessageContext */ public static final String MESSAGE_CORRELATOR_PROPERTY = MessageExchangeCorrelator.class.getName(); /** * Boolean MessageContext property that indicates whether or * not the MessageExchangeCorrelationService should be used. * (e.g. when sending a one-way message, correlation is not * required) */ public static final String ENABLE_CORRELATOR_SERVICE = MESSAGE_CORRELATOR_PROPERTY + "::Enable"; /** * Default value for the ENABLE_CORRELATOR_SERVICE * MessageContext property */ public static final Boolean ENABLE_CORRELATOR_SERVICE_DEFAULT = new Boolean(true); } 1.1 xml-axis/java/src/org/apache/axis/ime/ConfigurableMessageExchange.java Index: ConfigurableMessageExchange.java =================================================================== package org.apache.axis.ime; import java.util.Map; /** * Extends the basic MessageExchange interface to allow * applications to configure the MessageExchange * * Feature == a collection of default properties that * represent a complex behavior of some sort. * Reliable Delivery, for example. * * @author James M Snell (jasnell@us.ibm.com) */ public interface ConfigurableMessageExchange extends MessageExchange { public void enableFeature(String featureId); public void disableFeature(String featureId); public boolean isFeatureEnabled(String featureId); public void setProperty( String propertyId, Object propertyValue); public Object getProperty( String propertyId); public Object getProperty( String propertyId, Object defaultValue); public Map getProperties(); public void clearProperties(); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeLifecycle.java Index: MessageExchangeLifecycle.java =================================================================== package org.apache.axis.ime; /** * Interface that may be provided by MessageExchange impl's * to allow users to control the lifecycle of the "stuff" * going on under the covers * * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeLifecycle { public void init(); public void shutdown(); public void shutdown(boolean force); public void awaitShutdown() throws InterruptedException; public void awaitShutdown(long timeout) throws InterruptedException; } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeStatus.java Index: MessageExchangeStatus.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; /** * Used to indicate a custom MessageExchange event * * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeStatus extends Serializable {} 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeContextListener.java Index: MessageExchangeContextListener.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; import org.apache.axis.ime.*; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeContextListener extends Serializable { public void onMessageExchangeContext( MessageExchangeContext context); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageChannel.java Index: MessageChannel.java =================================================================== package org.apache.axis.ime; /** * A MessageChannel is a low level hybrid FIFO Queue and Keyed map * that serves as the storage for inbound or outbound messages. * Each MessageExchange implementation will create at least two * MessageChannels, one for messages being sent, and another for * messages that have been received. * * MessageChannels differ from traditional FIFO Queues in that * elements put in are keyed and can be taken out of order. * * Different implementations may allow for variations on * how the MessageChannel model is implemented. For instance, * the code will ship with a NonPersistentMessageChannel that * will store all contained objects in memory. The fact that * everything is stored in memory means that the Channel is not * fault tolerant. If fault tolerance is required, then a * PersistentMessageChannel must be created that stores the * MessageContext objects somehow. * * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageChannel { /** * Select, but do not remove the next message on the * channel. If one does not exist, return null */ public MessageExchangeContext peek(); /** * Put a message onto the channel */ public void put( Object key, MessageExchangeContext context); /** * Cancel a message that has been put on the channel. * Unlike select(Object key), this method will not block * and wait for a message with the specified key to be * put onto the MessageChannel. */ public MessageExchangeContext cancel( Object key); /** * Select and remove all of the messages currently in * the channel (useful for bulk operations). This * method will not block. It is also not guaranteed * that the Channel will be empty once this operation * returns (it is possible that another thread may * put new MessageContexts into the channel before this * operation completes) */ public MessageExchangeContext[] selectAll(); /** * Select and remove the next message in the channel * If a message is not available, wait indefinitely for one */ public MessageExchangeContext select() throws InterruptedException; /** * Select and remove the next message in the channel * If a message is not available, wait the specified amount * of time for one */ public MessageExchangeContext select( long timeout) throws InterruptedException; /** * Select and remove a specific message in the channel * If the message is not available, wait indefinitely * for one to be available */ public MessageExchangeContext select( Object key) throws InterruptedException; /** * Select and remove a specific message in the channel * If the message is not available, wait the specified * amount of time for one */ public MessageExchangeContext select( Object key, long timeout) throws InterruptedException; } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeFactory.java Index: MessageExchangeFactory.java =================================================================== package org.apache.axis.ime; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeFactory { public MessageExchange createMessageExchange(); } 1.1 xml-axis/java/src/org/apache/axis/ime/ConfigurableMessageExchangeFactory.java Index: ConfigurableMessageExchangeFactory.java =================================================================== package org.apache.axis.ime; import java.util.Map; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface ConfigurableMessageExchangeFactory extends MessageExchangeFactory { public ConfigurableMessageExchange createMessageExchange( Map properties, String[] enabledFeatures); } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeCorrelator.java Index: MessageExchangeCorrelator.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; /** * Used for correlating outbound/inbound messages. * This class may be extended to allow for more complex * Correlation mechanisms * * @author James M Snell (jasnell@us.ibm.com) */ public class MessageExchangeCorrelator implements Serializable { private String identifier; private MessageExchangeCorrelator() {} public MessageExchangeCorrelator( String identifier) { this.identifier = identifier; } public String getIdentifier() { return this.identifier; } } 1.1 xml-axis/java/src/org/apache/axis/ime/MessageExchangeFaultListener.java Index: MessageExchangeFaultListener.java =================================================================== package org.apache.axis.ime; import java.io.Serializable; /** * @author James M Snell (jasnell@us.ibm.com) */ public interface MessageExchangeFaultListener extends Serializable { public void onFault( MessageExchangeCorrelator correlator, Throwable exception); } 1.209 +1 -0 xml-axis/java/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-axis/java/build.xml,v retrieving revision 1.208 retrieving revision 1.209 diff -u -r1.208 -r1.209 --- build.xml 17 Oct 2002 23:34:57 -0000 1.208 +++ build.xml 26 Oct 2002 21:46:46 -0000 1.209 @@ -125,6 +125,7 @@ + 1.47 +13 -0 xml-axis/java/xmls/targets.xml Index: targets.xml =================================================================== RCS file: /home/cvs/xml-axis/java/xmls/targets.xml,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- targets.xml 25 Oct 2002 18:24:00 -0000 1.46 +++ targets.xml 26 Oct 2002 21:46:47 -0000 1.47 @@ -236,6 +236,15 @@ iis.found=${iis.found} iis.base=${iis.base} + + + + + + + + compile.ime=${compile.ime} +