summaryrefslogtreecommitdiff
path: root/java/src/Ice/DispatchStatus.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-07-23 13:56:46 -0700
committerMark Spruiell <mes@zeroc.com>2009-07-23 13:56:46 -0700
commit97924170161a928bc7856cffafd68c19f9b62ef6 (patch)
tree79d443402189123a7820dc7843d1a291dc038af7 /java/src/Ice/DispatchStatus.java
parentsuppress Java deprecation warnings (diff)
downloadice-97924170161a928bc7856cffafd68c19f9b62ef6.tar.bz2
ice-97924170161a928bc7856cffafd68c19f9b62ef6.tar.xz
ice-97924170161a928bc7856cffafd68c19f9b62ef6.zip
bug 4027 - change DispatchStatus to enum in Java
Diffstat (limited to 'java/src/Ice/DispatchStatus.java')
-rw-r--r--java/src/Ice/DispatchStatus.java46
1 files changed, 4 insertions, 42 deletions
diff --git a/java/src/Ice/DispatchStatus.java b/java/src/Ice/DispatchStatus.java
index 73d3e869173..2b897ecb765 100644
--- a/java/src/Ice/DispatchStatus.java
+++ b/java/src/Ice/DispatchStatus.java
@@ -14,58 +14,20 @@ package Ice;
*
* @see DispatchInterceptor
**/
-public final class DispatchStatus
+public enum DispatchStatus implements java.io.Serializable
{
- private static DispatchStatus[] __values = new DispatchStatus[3];
- private int __value;
-
- public static final int _DispatchOK = 0;
-
/**
* Indicates that an operation was dispatched synchronously and successfully.
**/
- public static final DispatchStatus DispatchOK =
- new DispatchStatus(_DispatchOK);
-
- public static final int _DispatchUserException = 1;
+ DispatchOK,
/**
* Indicates that an operation was dispatched synchronously and raised a user exception.
**/
- public static final DispatchStatus DispatchUserException =
- new DispatchStatus(_DispatchUserException);
-
- public static final int _DispatchAsync = 2;
+ DispatchUserException,
/**
* Indicates that an operation was dispatched asynchronously.
**/
- public static final DispatchStatus DispatchAsync =
- new DispatchStatus(_DispatchAsync);
-
- /**
- * Converts an ordinal value to the corresponding enumerator.
- **/
- public static DispatchStatus
- convert(int val)
- {
- assert val < 3;
- return __values[val];
- }
-
- /**
- * Returns the ordinal value of the current enumerator.
- **/
- public int
- value()
- {
- return __value;
- }
-
- private
- DispatchStatus(int val)
- {
- __value = val;
- __values[val] = this;
- }
+ DispatchAsync;
}