Author: chamikara
Date: Sun Dec  4 02:39:39 2005
New Revision: 353843

URL: http://svn.apache.org/viewcvs?rev=353843&view=rev
Log:
Moved constants used in the client API to a new interface (Sandesha2ClientAPI).

Added:
    webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2ClientAPI.java
Modified:
    webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java
    
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
    
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
    
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
    
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java
    
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java

Added: 
webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2ClientAPI.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2ClientAPI.java?rev=353843&view=auto
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2ClientAPI.java 
(added)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2ClientAPI.java 
Sun Dec  4 02:39:39 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy 
of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations 
under
+ * the License.
+ */
+
+package org.apache.sandesha2;
+
+/**
+ * Contains all the Sandesha2Constants of Sandesha2.
+ * Please see sub-interfaces to see grouped data.
+ * 
+ * @author Chamikara Jayalath <[EMAIL PROTECTED]>
+ */
+
+public interface Sandesha2ClientAPI {
+
+       String AcksTo = "Sandesha2ClientAPIPropertyAcksTo";
+       String LAST_MESSAGE = "Sandesha2ClientAPIPropertyWSRMLastMessage";
+       String OFFERED_SEQUENCE_ID = 
"Sandesha2ClientAPIPropertyOfferedSequenceId";
+       String SANDESHA_DEBUG_MODE = "Sandesha2ClientAPIPropertyDebugMode";
+       String SEQUENCE_KEY = "Sandesha2ClientAPIPropertySequenceKey";
+
+}

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java 
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java 
Sun Dec  4 02:39:39 2005
@@ -286,14 +286,6 @@
                }
        }
        
-       public interface ClientAPI {
-               String SEQUENCE_KEY = "Sandesha2ClientAPIPropertySequenceKey";
-               String SANDESHA_DEBUG_MODE = 
"Sandesha2ClientAPIPropertyDebugMode";
-               String OFFERED_SEQUENCE_ID = 
"Sandesha2ClientAPIPropertyOfferedSequenceId";
-               String LAST_MESSAGE = 
"Sandesha2ClientAPIPropertyWSRMLastMessage";
-               String AcksTo = "Sandesha2ClientAPIPropertyAcksTo";
-       }
-       
        String IN_HANDLER_NAME = "SandeshaInHandler";
 
        String OUT_HANDLER_NAME = "SandeshaOutHandler";

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
 (original)
+++ 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
 Sun Dec  4 02:39:39 2005
@@ -31,10 +31,10 @@
 import org.apache.axis2.soap.SOAPBody;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.SandeshaException;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.msgprocessors.ApplicationMsgProcessor;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.SequencePropertyBeanMgr;
@@ -84,7 +84,7 @@
                ServiceContext serviceContext = msgContext.getServiceContext();
                Object debug = null;
                if (serviceContext != null) {
-                       debug = 
msgContext.getProperty(ClientAPI.SANDESHA_DEBUG_MODE);
+                       debug = 
msgContext.getProperty(Sandesha2ClientAPI.SANDESHA_DEBUG_MODE);
                        if (debug != null && "on".equals(debug)) {
                                System.out.println("DEBUG: 
SandeshaGlobalInHandler got a '"
                                                + 
SandeshaUtil.getMessageTypeString(rmMessageContext

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
 (original)
+++ 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
 Sun Dec  4 02:39:39 2005
@@ -28,10 +28,10 @@
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.RMMsgContext;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.msgprocessors.MsgProcessor;
 import org.apache.sandesha2.msgprocessors.MsgProcessorFactory;
 import org.apache.sandesha2.util.FaultManager;
@@ -87,7 +87,7 @@
                ServiceContext serviceContext = msgCtx.getServiceContext();
                Object debug = null;
                if (serviceContext != null) {
-                       debug = 
msgCtx.getProperty(ClientAPI.SANDESHA_DEBUG_MODE);
+                       debug = 
msgCtx.getProperty(Sandesha2ClientAPI.SANDESHA_DEBUG_MODE);
                        if (debug != null && "on".equals(debug)) {
                                System.out.println("DEBUG: SandeshaInHandler 
got a '"
                                                + 
SandeshaUtil.getMessageTypeString(rmMsgCtx

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
 (original)
+++ 
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
 Sun Dec  4 02:39:39 2005
@@ -36,9 +36,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.sandesha2.RMMsgContext;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.SandeshaException;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.policy.RMPolicyBean;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.CreateSeqBeanMgr;
@@ -96,7 +96,7 @@
                OperationContext operationContext = 
msgCtx.getOperationContext();
                Object debug = null;
                if (serviceContext != null) {
-                       debug = 
msgCtx.getProperty(ClientAPI.SANDESHA_DEBUG_MODE);
+                       debug = 
msgCtx.getProperty(Sandesha2ClientAPI.SANDESHA_DEBUG_MODE);
                        if (debug != null && "on".equals(debug)) {
                                System.out.println("DEBUG: SandeshaOutHandler 
got a '"
                                                + 
SandeshaUtil.getMessageTypeString(rmMsgCtx
@@ -168,7 +168,7 @@
                        internalSequenceId = toEPR.getAddress();
                        OperationContext opContext = 
msgCtx.getOperationContext();
                        String sequenceKey = (String) msgCtx
-                                       .getProperty(ClientAPI.SEQUENCE_KEY);
+                                       
.getProperty(Sandesha2ClientAPI.SEQUENCE_KEY);
                        if (sequenceKey != null)
                                internalSequenceId = internalSequenceId + 
sequenceKey;
 
@@ -212,7 +212,7 @@
                                String acksTo = null;
                                if (serviceContext != null) {
                                        acksTo = (String) msgCtx
-                                                       
.getProperty(ClientAPI.AcksTo);
+                                                       
.getProperty(Sandesha2ClientAPI.AcksTo);
                                }
 
                                if (acksTo == null)
@@ -502,7 +502,7 @@
 
                        OperationContext operationContext = 
msg.getOperationContext();
                        if (operationContext != null) {
-                               Object obj = 
msg.getProperty(ClientAPI.LAST_MESSAGE);
+                               Object obj = 
msg.getProperty(Sandesha2ClientAPI.LAST_MESSAGE);
                                if (obj != null && "true".equals(obj)) {
                                        lastMessage = true;
                                        sequence.setLastMessage(new 
LastMessage(factory));

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java 
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java 
Sun Dec  4 02:39:39 2005
@@ -34,10 +34,10 @@
 import org.apache.axis2.description.Flow;
 import org.apache.axis2.soap.SOAPEnvelope;
 import org.apache.axis2.soap.SOAPFactory;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.SandeshaException;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.policy.RMPolicyBean;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.SequencePropertyBeanMgr;
@@ -148,7 +148,7 @@
                                .getOperationContext();
                if (operationcontext != null) {
                        String offeredSequence = (String) applicationMsgContext
-                                       
.getProperty(ClientAPI.OFFERED_SEQUENCE_ID);
+                                       
.getProperty(Sandesha2ClientAPI.OFFERED_SEQUENCE_ID);
                        if (offeredSequence != null && 
!"".equals(offeredSequence)) {
                                SequenceOffer offerPart = new 
SequenceOffer(factory);
                                Identifier identifier = new Identifier(factory);

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java 
(original)
+++ 
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java 
Sun Dec  4 02:39:39 2005
@@ -10,6 +10,7 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.AbstractContext;
 import org.apache.axis2.context.MessageContext;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.SandeshaException;
@@ -108,7 +109,7 @@
                EndpointReference toEPR = firstAplicationMsgCtx.getTo();
                EndpointReference replyToEPR = 
firstAplicationMsgCtx.getReplyTo();
                String acksTo = (String) firstAplicationMsgCtx
-                               
.getProperty(Sandesha2Constants.ClientAPI.AcksTo);
+                               .getProperty(Sandesha2ClientAPI.AcksTo);
 
                if (toEPR == null)
                        throw new SandeshaException("WS-Addressing To is null");

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java 
(original)
+++ 
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java 
Sun Dec  4 02:39:39 2005
@@ -24,11 +24,11 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.engine.AxisEngine;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.TerminateManager;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.NextMsgBeanMgr;
 import org.apache.sandesha2.storage.beanmanagers.SequencePropertyBeanMgr;
@@ -150,7 +150,7 @@
                                                        Object debug = null;
                                                        if (serviceContext != 
null) {
                                                                debug = 
msgToInvoke
-                                                                               
.getProperty(ClientAPI.SANDESHA_DEBUG_MODE);
+                                                                               
.getProperty(Sandesha2ClientAPI.SANDESHA_DEBUG_MODE);
                                                                if (debug != 
null && "on".equals(debug)) {
                                                                        
System.out
                                                                                
        .println("DEBUG: Invoker invoking a '"

Modified: 
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java?rev=353843&r1=353842&r2=353843&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java 
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java Sun 
Dec  4 02:39:39 2005
@@ -25,11 +25,11 @@
 import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.soap.SOAPEnvelope;
 import org.apache.sandesha2.AcknowledgementManager;
+import org.apache.sandesha2.Sandesha2ClientAPI;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.TerminateManager;
-import org.apache.sandesha2.Sandesha2Constants.ClientAPI;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr;
 import org.apache.sandesha2.storage.beans.SenderBean;
@@ -93,7 +93,7 @@
                                                Object debug = null;
                                                if (serviceContext != null) {
                                                        debug = msgCtx
-                                                                       
.getProperty(ClientAPI.SANDESHA_DEBUG_MODE);
+                                                                       
.getProperty(Sandesha2ClientAPI.SANDESHA_DEBUG_MODE);
                                                        if (debug != null && 
"on".equals(debug)) {
                                                                System.out
                                                                                
.println("DEBUG: Sender is sending a '"



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to