You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ms...@apache.org on 2007/06/27 20:35:33 UTC
svn commit: r551261 -
/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/
Author: mszefler
Date: Wed Jun 27 11:35:31 2007
New Revision: 551261
URL: http://svn.apache.org/viewvc?view=rev&rev=551261
Log:
Additional BART interface tweeks.
Added:
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java (with props)
Modified:
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java
incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java Wed Jun 27 11:35:31 2007
@@ -139,7 +139,7 @@
MyRoleMessageExchange createMessageExchange(InvocationStyle istyle,
QName serviceId,
String operation,
- String clientKey)
+ String foreignKey)
throws BpelEngineException;
/**
@@ -152,4 +152,6 @@
MessageExchange getMessageExchange(String mexId)
throws BpelEngineException;
+ MessageExchange getMessageExchangeByForeignKey(String foreignKey)
+ throws BpelEngineException;
}
Added: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java?view=auto&rev=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java (added)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java Wed Jun 27 11:35:31 2007
@@ -0,0 +1,33 @@
+package org.apache.ode.bpel.iapi;
+
+/**
+ * Style of invocation supported by the integration layer for a given operation.
+ *
+ * @author Maciej Szefler
+ */
+public enum InvocationStyle {
+ /**
+ * The very ordinary blocking IO style --- the IL will block until the operation is complete, or until
+ * a timeout is reached.
+ */
+ BLOCKING,
+
+ /**
+ * Asynchrnous style -- the IL will "queue" the invocation, and call-back asynchrnously when the response
+ * is available.
+ */
+ ASYNC,
+
+ /**
+ * Reliable style -- the IL will queue the invocation using the current transaction. The response will be
+ * delivered when available using a separate transaction.
+ */
+ RELIABLE,
+
+
+ /**
+ * Transacted style -- the IL will enroll the operation with the current transaction. The IL will block until the
+ * operation completes.
+ */
+ TRANSACTED
+}
\ No newline at end of file
Propchange: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java Wed Jun 27 11:35:31 2007
@@ -121,6 +121,12 @@
InvocationStyle getInvocationStyle();
/**
+ * Get the time-out in ms.
+ * @return
+ */
+ long getTimeout();
+
+ /**
* Get the name of the operation (WSDL 1.1) / message exchange (WSDL 1.2?).
*
* @return name of the operation (WSDL 1.1) /message exchange (WSDL 1.2?).
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java Wed Jun 27 11:35:31 2007
@@ -18,6 +18,8 @@
*/
package org.apache.ode.bpel.iapi;
+import java.util.Set;
+
import org.apache.ode.bpel.iapi.MessageExchange.FailureType;
import org.w3c.dom.Element;
@@ -90,11 +92,30 @@
void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws ContextException;
/**
+ * Cancel an async/reliable partner-role message exchange.
+ * @param mex message exchange that should be cancelled.
+ * @throws ContextException
+ */
+ void cancel(PartnerRoleMessageExchange mex) throws ContextException;
+
+ /**
* Method used to asynchronously deliver to the integration layer the BPEL engine's response to an invocation that could not
* complete synchronously.
*
* @see MyRoleMessageExchange#invoke(Message)
*/
void onAsyncReply(MyRoleMessageExchange myRoleMex) throws BpelEngineException;
+
+ void onReliableReply(MyRoleMessageExchange myRoleMex) throws BpelEngineException;
+
+ /**
+ * Get the supported invocation styles (see {@link InvocationStyle}) for invoking the EPR provided
+ * via a given channel.
+ *
+ * @param partnerEpr partner's EPR
+ * @return supported invocation styles
+ */
+ Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr);
+
}
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java Wed Jun 27 11:35:31 2007
@@ -21,6 +21,7 @@
import javax.xml.namespace.QName;
import java.util.concurrent.Future;
+import java.util.concurrent.TimeoutException;
/**
* Extension of the {@link org.apache.ode.bpel.iapi.MessageExchange} interface
@@ -59,25 +60,35 @@
void setRequest(Message request);
/**
- * "Invoke" a process hosted by the BPEL engine. The state of the invocation
- * may be obtained by a call to the {@link MessageExchange#getStatus()}
- * method. It is possible that the response for the operation is not
- * immediately available (i.e the call to {@link #invoke(Message)} will
- * return before a response is available). In such cases,
- * {@link MessageExchange#getStatus()} == {@link Status#ASYNC} and the
- * integration layer will receive an asynchronous notification from the BPEL
- * engine via the
- * {@link MessageExchangeContext#onAsyncReply(MyRoleMessageExchange)} when
- * the response become available.
+ * Invoke a process hosted by the BPEL engine, blocking until the operation completes.
+ *
+ * @return the final status of the operation
+ *
*/
- void invokeBlocking();
+ MessageExchange.Status invokeBlocking() throws BpelEngineException, TimeoutException;
+ /**
+ * Invoke a transactional process: this method must be invoked in a transaction. The invoking thread
+ * will be blocked for the duration of the call.
+ *
+ * @return the final status of the operation (provided that commit succeedes)
+ */
+ MessageExchange.Status invokeTransacted() throws BpelEngineException;
+
+ /**
+ * Invoke a reliable process: this method must be invoked in a transaction. The invoking thread will
+ * not be blocked. When the response is available, it will be provided via the {@link MessageExchangeContext#onReliableReply(MyRoleMessageExchange)}.
+ *
+ */
void invokeReliable();
- void invokeAsync();
-
- void invokeTransacted();
-
+ /**
+ * Invoke a processs asynchronously. This method will start an operation, but will not block; instead a future object is returned.
+ *
+ * @return
+ */
+ Future<MessageExchange.Status> invokeAsync();
+
/**
* Complete the message, exchange: indicates that the client has receive the
* response (if any).
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java Wed Jun 27 11:35:31 2007
@@ -31,15 +31,6 @@
public interface PartnerRoleChannel {
/**
- * Get the supported invocation styles (see {@link InvocationStyle}) for invoking the EPR provided
- * via this channel.
- *
- * @param partnerEpr partner's EPR
- * @return supported invocation styles
- */
- Set<InvocationStyle> getSupportedInvocationStyle(EndpointReference partnerEpr);
-
- /**
* Return the endpoint reference to the endpoint with which the
* channel was initialized or <code>null</code> if the channel
* was initialized without an initial endpoint.
Modified: incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java?view=diff&rev=551261&r1=551260&r2=551261
==============================================================================
--- incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java (original)
+++ incubator/ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java Wed Jun 27 11:35:31 2007
@@ -88,8 +88,10 @@
/**
* Indicate that the response to the request/response operation is not yet available and that the response will be delivered
* asynchronously.
+ *
+ * @param foreignKey "foreign" key that is used to identify this message exchange.
*/
- void replyAsync();
+ void replyAsync(String foreignKey);
/**
* Get the {@link EndpointReference} associated with the my-role of the partner link to which this message exchange belongs.