You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/01/05 08:03:24 UTC

svn commit: r366102 - in /webservices/sandesha/trunk/src/org/apache/sandesha2/client: ./ RMReport.java Sandesha2ClientAPI.java SequenceReport.java

Author: chamikara
Date: Wed Jan  4 23:03:07 2006
New Revision: 366102

URL: http://svn.apache.org/viewcvs?rev=366102&view=rev
Log:
Moved client files to a new package

Added:
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/RMReport.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/SequenceReport.java

Added: webservices/sandesha/trunk/src/org/apache/sandesha2/client/RMReport.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/RMReport.java?rev=366102&view=auto
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/RMReport.java (added)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/RMReport.java Wed Jan  4 23:03:07 2006
@@ -0,0 +1,50 @@
+/*
+ * 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.client;
+
+import java.util.ArrayList;
+
+
+/**
+ * @author Chamikara Jayalath <ch...@gmail.com>
+ */
+public class RMReport {
+	
+	private ArrayList incomingSequenceList = null;
+	private ArrayList outgoingSequenceList = null;
+	
+	public RMReport () {
+		incomingSequenceList = new ArrayList ();
+		outgoingSequenceList = new ArrayList ();
+	}
+	
+	public void addIncomingSequenceID (String sequenceID) {
+		incomingSequenceList.add(sequenceID);
+	}
+	
+	public void addOutgoingSequenceID (String sequenceID) {
+		outgoingSequenceList.add(sequenceID);
+	}
+	
+	public ArrayList getIncomingSequenceList () {
+		return incomingSequenceList;
+	}
+	
+	public ArrayList getOutgoingSequenceList () {
+		return outgoingSequenceList;
+	}
+}

Added: webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java?rev=366102&view=auto
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java (added)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/Sandesha2ClientAPI.java Wed Jan  4 23:03:07 2006
@@ -0,0 +1,66 @@
+/*
+ * 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.client;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.util.SandeshaUtil;
+import org.apache.sandesha2.util.SequenceManager;
+
+/**
+ * Contains all the Sandesha2Constants of Sandesha2.
+ * Please see sub-interfaces to see grouped data.
+ * 
+ * @author Chamikara Jayalath <ch...@gmail.com>
+ */
+
+public class Sandesha2ClientAPI {
+
+	public static String AcksTo = "Sandesha2ClientAPIPropertyAcksTo";
+	public static String LAST_MESSAGE = "Sandesha2ClientAPIPropertyWSRMLastMessage";
+	public static String OFFERED_SEQUENCE_ID = "Sandesha2ClientAPIPropertyOfferedSequenceId";
+	public static String SANDESHA_DEBUG_MODE = "Sandesha2ClientAPIPropertyDebugMode";
+	public static String SEQUENCE_KEY = "Sandesha2ClientAPIPropertySequenceKey";
+
+	public static SequenceReport getOutgoingSequenceReport (String to, String sequenceKey,ConfigurationContext configurationContext) throws SandeshaException {
+		
+		String internalSequenceID = SandeshaUtil.getInternalSequenceID (to,sequenceKey);
+		SequenceReport sequenceReport = new SequenceReport ();
+		
+//		report.setAckedMessageCount(SequenceManager.getOutGoingSequenceAckedMessageCount (internalSequenceID,configurationContext));
+//		report.setSequenceCompleted(SequenceManager.isOutGoingSequenceCompleted (internalSequenceID,configurationContext));
+//		report.setOutGoingSequence(true);
+					
+		return sequenceReport;
+	}
+	
+	public static SequenceReport getIncomingSequenceReport (String sequenceID,ConfigurationContext configurationContext) throws SandeshaException {
+		
+		SequenceReport sequenceReport = new SequenceReport ();
+		
+//		report.setOutGoingSequence(false);
+//		report.setAckedMessageCount(SequenceManager.getIncomingSequenceAckedMessageCount(sequenceID,configurationContext));
+//		report.setSequenceCompleted(SequenceManager.isIncomingSequenceCompleted(sequenceID,configurationContext));
+		
+		return sequenceReport;
+	}
+	
+	public static RMReport getRMReport1 () {
+		RMReport rmReport = new RMReport ();
+		return rmReport;
+	}
+}

Added: webservices/sandesha/trunk/src/org/apache/sandesha2/client/SequenceReport.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/SequenceReport.java?rev=366102&view=auto
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/SequenceReport.java (added)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/SequenceReport.java Wed Jan  4 23:03:07 2006
@@ -0,0 +1,90 @@
+/*
+ * 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.client;
+
+import java.util.ArrayList;
+
+/**
+ * @author Chamikara Jayalath <ch...@gmail.com>
+ */
+
+public class SequenceReport {
+
+	public static final byte SEQUENCE_STATUS_ACTIVE = 1;
+	public static final byte SEQUENCE_STATUS_TERMINATED = 2;
+	public static final byte SEQUENCE_STATUS_TIMEDOUT = 3;
+	
+	public static final byte SEQUENCE_DIRECTION_IN=1;
+	public static final byte SEQUENCE_DIRECTION_OUT=2;
+	
+	private byte sequenceStatus = SEQUENCE_STATUS_ACTIVE;
+	private byte sequenceDirection = SEQUENCE_DIRECTION_OUT;
+	private String sequenceID = null;
+	private ArrayList ackedMessages = null;
+	private boolean sequenceEstablished = false;
+	
+	public SequenceReport () {
+		ackedMessages = new ArrayList ();
+	}
+	
+	public void setSequenceStatus (byte sequenceStatus) {
+		if (sequenceStatus>=SEQUENCE_STATUS_ACTIVE && sequenceStatus<=SEQUENCE_STATUS_TIMEDOUT) {
+			this.sequenceStatus = sequenceStatus;
+		}
+	}
+	
+	public void setSequenceDirection (byte sequenceDirection) {
+		if (sequenceDirection>=SEQUENCE_DIRECTION_IN && sequenceDirection<=SEQUENCE_DIRECTION_OUT) {
+			this.sequenceDirection = sequenceDirection;
+		}
+	}
+	
+	public byte getSequenceStatus () {
+		return sequenceStatus;
+	}
+	
+	public byte getSequenceDirection () {
+		return sequenceDirection;
+	}
+
+	public String getSequenceID() {
+		return sequenceID;
+	}
+
+	public void setSequenceID(String sequenceID) {
+		this.sequenceID = sequenceID;
+	}
+	
+	public ArrayList getAckedMessages () {
+		return ackedMessages;
+	}
+
+	public boolean isSequenceEstablished() {
+		return sequenceEstablished;
+	}
+
+	public void setSequenceEstablished(boolean sequenceEstablished) {
+		this.sequenceEstablished = sequenceEstablished;
+	}
+	
+	
+	public void setAckedMessage (String ackedMessage) {
+		ackedMessages.add(ackedMessage);
+	}
+	
+	
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org