Author: ron.sigal(a)jboss.com
Date: 2010-09-15 18:07:16 -0400 (Wed, 15 Sep 2010)
New Revision: 6100
Modified:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java
Log:
JBREM-1228: Added actions.
Modified:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java 2010-09-15
22:05:57 UTC (rev 6099)
+++
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java 2010-09-15
22:07:16 UTC (rev 6100)
@@ -25,23 +25,39 @@
import java.io.Serializable;
public final class InvocationTestObject implements Serializable {
- private static final long serialVersionUID = 7228470862155215008L;
- private final int frob = 12345;
+ public static final String REPLY = "reply";
+ public static final String FAILURE = "failure";
+ public static final String CANCEL = "cancel";
- public int getFrob() {
- return frob;
+ private static final long serialVersionUID = -6604871321606284771L;
+
+ private String action = REPLY;
+
+ public InvocationTestObject() {
}
+
+ public InvocationTestObject(String action) {
+ this.action = action;
+ }
+
+ public String getAction() {
+ return action;
+ }
public boolean equals(final Object obj) {
return obj instanceof InvocationTestObject &&
equals((InvocationTestObject) obj);
}
public boolean equals(final InvocationTestObject obj) {
- return obj != null && obj.frob == frob;
+ return obj != null && obj.action.equals(action);
}
public int hashCode() {
- return frob;
+ return action.hashCode();
}
+
+ public String toString() {
+ return "InvocationTestObject[" + System.identityHashCode(this) + ",
" + action + "]";
+ }
}
Show replies by date