hammant 02/01/01 09:53:07
Modified: armi/src/java/org/apache/commons/armi/client/impl
ObjectStreamInvocationHandler.java
armi/src/java/org/apache/commons/armi/client/impl/direct
DirectInvocationHandler.java
armi/src/java/org/apache/commons/armi/client/impl/rmi
RmiInvocationHandler.java
armi/src/java/org/apache/commons/armi/common
TryLaterReply.java
armi/src/java/org/apache/commons/armi/server/impl
AbstractServer.java
Added: armi/src/java/org/apache/commons/armi/common
SuspendedReply.java
Log:
SuspendedReply created
Revision Changes Path
1.4 +5 -5
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/ObjectStreamInvocationHandler.java
Index: ObjectStreamInvocationHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/ObjectStreamInvocationHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ObjectStreamInvocationHandler.java 31 Dec 2001 13:48:21 -0000 1.3
+++ ObjectStreamInvocationHandler.java 1 Jan 2002 17:53:06 -0000 1.4
@@ -1,8 +1,8 @@
/*
- * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/ObjectStreamInvocationHandler.java,v
1.3 2001/12/31 13:48:21 hammant Exp $
- * $Revision: 1.3 $
- * $Date: 2001/12/31 13:48:21 $
+ * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/ObjectStreamInvocationHandler.java,v
1.4 2002/01/01 17:53:06 hammant Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
@@ -83,7 +83,7 @@
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class ObjectStreamInvocationHandler implements ArmiInvocationHandler {
@@ -135,7 +135,7 @@
mOOS.flush();
reply = (ArmiReply) mOIS.readObject();
if (reply instanceof TryLaterReply) {
- int millis = ((TryLaterReply) reply).getDelayMillis();
+ int millis = ((TryLaterReply)
reply).getSuggestedDelayMillis();
try {
Thread.sleep(millis);
} catch (InterruptedException ie) {}
1.4 +5 -5
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/direct/DirectInvocationHandler.java
Index: DirectInvocationHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/direct/DirectInvocationHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DirectInvocationHandler.java 31 Dec 2001 13:48:21 -0000 1.3
+++ DirectInvocationHandler.java 1 Jan 2002 17:53:06 -0000 1.4
@@ -1,8 +1,8 @@
/*
- * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/direct/DirectInvocationHandler.java,v
1.3 2001/12/31 13:48:21 hammant Exp $
- * $Revision: 1.3 $
- * $Date: 2001/12/31 13:48:21 $
+ * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/direct/DirectInvocationHandler.java,v
1.4 2002/01/01 17:53:06 hammant Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
@@ -78,7 +78,7 @@
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public final class DirectInvocationHandler implements ArmiInvocationHandler {
@@ -114,7 +114,7 @@
again = false;
reply = mArmiInvocationHandler.handleInvocation(request);
if (reply instanceof TryLaterReply) {
- int millis = ((TryLaterReply) reply).getDelayMillis();
+ int millis = ((TryLaterReply) reply).getSuggestedDelayMillis();
try {
Thread.sleep(millis);
} catch (InterruptedException ie) {}
1.4 +5 -5
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/rmi/RmiInvocationHandler.java
Index: RmiInvocationHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/rmi/RmiInvocationHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RmiInvocationHandler.java 31 Dec 2001 13:48:21 -0000 1.3
+++ RmiInvocationHandler.java 1 Jan 2002 17:53:06 -0000 1.4
@@ -1,8 +1,8 @@
/*
- * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/rmi/RmiInvocationHandler.java,v
1.3 2001/12/31 13:48:21 hammant Exp $
- * $Revision: 1.3 $
- * $Date: 2001/12/31 13:48:21 $
+ * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/client/impl/rmi/RmiInvocationHandler.java,v
1.4 2002/01/01 17:53:06 hammant Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
@@ -86,7 +86,7 @@
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public final class RmiInvocationHandler implements ArmiInvocationHandler {
@@ -138,7 +138,7 @@
again = false;
reply = mRmiArmiInvocationHandler.handleInvocation(request);
if (reply instanceof TryLaterReply) {
- int millis = ((TryLaterReply) reply).getDelayMillis();
+ int millis = ((TryLaterReply) reply).getSuggestedDelayMillis();
try {
Thread.sleep(millis);
} catch (InterruptedException ie) {}
1.2 +8 -8
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/TryLaterReply.java
Index: TryLaterReply.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/TryLaterReply.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TryLaterReply.java 31 Dec 2001 12:48:42 -0000 1.1
+++ TryLaterReply.java 1 Jan 2002 17:53:06 -0000 1.2
@@ -1,8 +1,8 @@
/*
- * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/TryLaterReply.java,v
1.1 2001/12/31 12:48:42 hammant Exp $
- * $Revision: 1.1 $
- * $Date: 2001/12/31 12:48:42 $
+ * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/TryLaterReply.java,v
1.2 2002/01/01 17:53:06 hammant Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
@@ -68,18 +68,18 @@
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class TryLaterReply extends ArmiReply {
- private final int mDelayMillis;
+ private final int mSuggestedDelayMillis;
/**
* Constructor TryLaterReply
*
*/
public TryLaterReply() {
- mDelayMillis = 5 * 1000; // ten seconds.
+ mSuggestedDelayMillis = 5 * 1000; // ten seconds.
}
@@ -90,8 +90,8 @@
* @param delayMillis
*
*/
- public TryLaterReply(int delayMillis) {
- mDelayMillis = delayMillis;
+ public TryLaterReply(int suggestedDelayMillis) {
+ mSuggestedDelayMillis = suggestedDelayMillis;
}
/**
@@ -101,7 +101,7 @@
* @return
*
*/
- public int getDelayMillis() {
- return mDelayMillis;
+ public int getSuggestedDelayMillis() {
+ return mSuggestedDelayMillis;
}
}
1.1
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/SuspendedReply.java
Index: SuspendedReply.java
===================================================================
/*
* $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/common/SuspendedReply.java,v
1.1 2002/01/01 17:53:06 hammant Exp $
* $Revision: 1.1 $
* $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.commons.armi.common;
/**
* Class SuspendedReply
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
* @version $Revision: 1.1 $
*/
public class SuspendedReply extends TryLaterReply {
}
1.5 +6 -5
jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/server/impl/AbstractServer.java
Index: AbstractServer.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/server/impl/AbstractServer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractServer.java 31 Dec 2001 13:48:21 -0000 1.4
+++ AbstractServer.java 1 Jan 2002 17:53:06 -0000 1.5
@@ -1,8 +1,8 @@
/*
- * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/server/impl/AbstractServer.java,v
1.4 2001/12/31 13:48:21 hammant Exp $
- * $Revision: 1.4 $
- * $Date: 2001/12/31 13:48:21 $
+ * $Header:
/home/cvs/jakarta-commons-sandbox/armi/src/java/org/apache/commons/armi/server/impl/AbstractServer.java,v
1.5 2002/01/01 17:53:06 hammant Exp $
+ * $Revision: 1.5 $
+ * $Date: 2002/01/01 17:53:06 $
*
* ====================================================================
*
@@ -76,6 +76,7 @@
import org.apache.commons.armi.common.RequestFailedReply;
import org.apache.commons.armi.common.TryLaterReply;
import org.apache.commons.armi.common.NotPublishedReply;
+import org.apache.commons.armi.common.SuspendedReply;
import java.lang.reflect.Method;
@@ -88,7 +89,7 @@
*
*
* @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class AbstractServer extends AbstractMethodHandler implements ArmiServer {
@@ -156,7 +157,7 @@
public ArmiReply processRequest(ArmiRequest request) {
if (mSuspend == true) {
- return new TryLaterReply();
+ return new SuspendedReply();
}
if (request instanceof MethodRequest) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>