summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-05-17 18:44:28 +0000
committerBernard Normier <bernard@zeroc.com>2007-05-17 18:44:28 +0000
commitc44f531305ba295f52a2eb50390cf4e4d0fb78da (patch)
tree7dceada2d44cfba48ebe228f31771ff63b819d5c
parentRemoved incorrect comment (diff)
downloadice-c44f531305ba295f52a2eb50390cf4e4d0fb78da.tar.bz2
ice-c44f531305ba295f52a2eb50390cf4e4d0fb78da.tar.xz
ice-c44f531305ba295f52a2eb50390cf4e4d0fb78da.zip
Split DispatchStatus into DispatchStatus and ReplyStatus
-rw-r--r--cpp/src/slice2java/Gen.cpp26
-rw-r--r--java/src/Ice/Blobject.java6
-rw-r--r--java/src/Ice/BlobjectAsync.java4
-rw-r--r--java/src/Ice/DispatchInterceptor.java14
-rw-r--r--java/src/Ice/DispatchStatus.java48
-rw-r--r--java/src/Ice/Object.java6
-rw-r--r--java/src/Ice/ObjectImpl.java26
-rw-r--r--java/src/Ice/_ObjectDelD.java32
-rw-r--r--java/src/IceInternal/Direct.java2
-rw-r--r--java/src/IceInternal/DispatchStatus.java76
-rw-r--r--java/src/IceInternal/Incoming.java42
-rw-r--r--java/src/IceInternal/IncomingAsync.java6
-rw-r--r--java/src/IceInternal/IncomingBase.java32
-rw-r--r--java/src/IceInternal/Outgoing.java36
-rw-r--r--java/src/IceInternal/OutgoingAsync.java42
-rw-r--r--java/src/IceInternal/ReplyStatus.java22
-rw-r--r--java/src/IceInternal/TraceUtil.java38
-rw-r--r--java/test/Ice/build.xml2
-rw-r--r--java/test/Ice/interceptor/AMDInterceptorI.java14
-rw-r--r--java/test/Ice/interceptor/Client.java33
-rw-r--r--java/test/Ice/interceptor/InterceptorI.java6
21 files changed, 261 insertions, 252 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index cfae6c72be1..08ec3d245b3 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -563,7 +563,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
assert(cl);
string opName = op->name();
- out << sp << nl << "public static IceInternal.DispatchStatus" << nl << "___" << opName << '(' << name
+ out << sp << nl << "public static Ice.DispatchStatus" << nl << "___" << opName << '(' << name
<< " __obj, IceInternal.Incoming __inS, Ice.Current __current)";
out << sb;
@@ -702,7 +702,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
{
out << nl << "__os.writePendingObjects();";
}
- out << nl << "return IceInternal.DispatchStatus.DispatchOK;";
+ out << nl << "return Ice.DispatchStatus.DispatchOK;";
//
// Handle user exceptions.
@@ -717,7 +717,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
out << nl << "catch(" << exS << " ex)";
out << sb;
out << nl << "__os.writeUserException(ex);";
- out << nl << "return IceInternal.DispatchStatus.DispatchUserException;";
+ out << nl << "return Ice.DispatchStatus.DispatchUserException;";
out << eb;
}
}
@@ -800,7 +800,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
out << sb;
out << nl << "__cb.ice_exception(ex);";
out << eb;
- out << nl << "return IceInternal.DispatchStatus.DispatchAsync;";
+ out << nl << "return Ice.DispatchStatus.DispatchAsync;";
out << eb;
}
@@ -833,13 +833,13 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
}
out << eb << ';';
- out << sp << nl << "public IceInternal.DispatchStatus" << nl
+ out << sp << nl << "public Ice.DispatchStatus" << nl
<< "__dispatch(IceInternal.Incoming in, Ice.Current __current)";
out << sb;
out << nl << "int pos = java.util.Arrays.binarySearch(__all, __current.operation);";
out << nl << "if(pos < 0)";
out << sb;
- out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;";
+ out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);";
out << eb;
out << sp << nl << "switch(pos)";
out << sb;
@@ -903,7 +903,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
}
out << eb;
out << sp << nl << "assert(false);";
- out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;";
+ out << nl << "throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);";
out << eb;
@@ -4309,7 +4309,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current)";
out << sb;
- out << nl << "public IceInternal.DispatchStatus run(Ice.Object __obj)";
+ out << nl << "public Ice.DispatchStatus run(Ice.Object __obj)";
out << sb;
out << nl << fixKwd(name) << " __servant = null;";
out << nl << "try";
@@ -4333,7 +4333,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "__result.value = ";
}
out << "__servant." << opName << spar << args << "__current" << epar << ';';
- out << nl << "return IceInternal.DispatchStatus.DispatchOK;";
+ out << nl << "return Ice.DispatchStatus.DispatchOK;";
if(!throws.empty())
{
@@ -4341,7 +4341,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "catch(Ice.UserException __ex)";
out << sb;
out << nl << "setUserException(__ex);";
- out << nl << "return IceInternal.DispatchStatus.DispatchUserException;";
+ out << nl << "return Ice.DispatchStatus.DispatchUserException;";
out << eb;
}
out << eb;
@@ -4350,10 +4350,10 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "try";
out << sb;
- out << nl << "IceInternal.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);";
+ out << nl << "Ice.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);";
if(!throws.empty())
{
- out << nl << "if(__status == IceInternal.DispatchStatus.DispatchUserException)";
+ out << nl << "if(__status == Ice.DispatchStatus.DispatchUserException)";
out << sb;
out << nl << "try";
out << sb;
@@ -4374,7 +4374,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
out << eb;
}
- out << nl << "assert __status == IceInternal.DispatchStatus.DispatchOK;";
+ out << nl << "assert __status == Ice.DispatchStatus.DispatchOK;";
if(ret)
{
out << nl << "return __result.value;";
diff --git a/java/src/Ice/Blobject.java b/java/src/Ice/Blobject.java
index 0de693e36d0..daadab0654c 100644
--- a/java/src/Ice/Blobject.java
+++ b/java/src/Ice/Blobject.java
@@ -15,7 +15,7 @@ public abstract class Blobject extends Ice.ObjectImpl
public abstract boolean
ice_invoke(byte[] inParams, ByteSeqHolder outParams, Current current);
- public IceInternal.DispatchStatus
+ public DispatchStatus
__dispatch(IceInternal.Incoming in, Current current)
{
byte[] inParams;
@@ -29,11 +29,11 @@ public abstract class Blobject extends Ice.ObjectImpl
}
if(ok)
{
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
else
{
- return IceInternal.DispatchStatus.DispatchUserException;
+ return DispatchStatus.DispatchUserException;
}
}
}
diff --git a/java/src/Ice/BlobjectAsync.java b/java/src/Ice/BlobjectAsync.java
index 5418015561f..50288c12a50 100644
--- a/java/src/Ice/BlobjectAsync.java
+++ b/java/src/Ice/BlobjectAsync.java
@@ -14,7 +14,7 @@ public abstract class BlobjectAsync extends Ice.ObjectImpl
public abstract void
ice_invoke_async(AMD_Object_ice_invoke cb, byte[] inParams, Current current);
- public IceInternal.DispatchStatus
+ public DispatchStatus
__dispatch(IceInternal.Incoming in, Current current)
{
byte[] inParams;
@@ -29,6 +29,6 @@ public abstract class BlobjectAsync extends Ice.ObjectImpl
{
cb.ice_exception(ex);
}
- return IceInternal.DispatchStatus.DispatchAsync;
+ return DispatchStatus.DispatchAsync;
}
}
diff --git a/java/src/Ice/DispatchInterceptor.java b/java/src/Ice/DispatchInterceptor.java
index 7c84a47dd6e..46b6a5eeab0 100644
--- a/java/src/Ice/DispatchInterceptor.java
+++ b/java/src/Ice/DispatchInterceptor.java
@@ -11,16 +11,16 @@ package Ice;
public abstract class DispatchInterceptor extends ObjectImpl
{
- public abstract IceInternal.DispatchStatus
+ public abstract DispatchStatus
dispatch(Request request);
- public IceInternal.DispatchStatus
+ public DispatchStatus
__dispatch(IceInternal.Incoming in, Current current)
{
try
{
- IceInternal.DispatchStatus status = dispatch(in);
- if(status != IceInternal.DispatchStatus.DispatchAsync)
+ DispatchStatus status = dispatch(in);
+ if(status != DispatchStatus.DispatchAsync)
{
//
// Make sure 'in' owns the connection etc.
@@ -31,7 +31,7 @@ public abstract class DispatchInterceptor extends ObjectImpl
}
catch(ResponseSentException e)
{
- return IceInternal.DispatchStatus.DispatchAsync;
+ return DispatchStatus.DispatchAsync;
}
catch(java.lang.RuntimeException e)
{
@@ -42,12 +42,12 @@ public abstract class DispatchInterceptor extends ObjectImpl
}
catch(ResponseSentException rse)
{
- return IceInternal.DispatchStatus.DispatchAsync;
+ return DispatchStatus.DispatchAsync;
}
}
}
- public IceInternal.DispatchStatus
+ public DispatchStatus
__collocDispatch(IceInternal.Direct request)
{
//
diff --git a/java/src/Ice/DispatchStatus.java b/java/src/Ice/DispatchStatus.java
new file mode 100644
index 00000000000..51d7de328b2
--- /dev/null
+++ b/java/src/Ice/DispatchStatus.java
@@ -0,0 +1,48 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package Ice;
+
+public final class DispatchStatus
+{
+ private static DispatchStatus[] __values = new DispatchStatus[3];
+ private int __value;
+
+ public static final int _DispatchOK = 0;
+ public static final DispatchStatus DispatchOK =
+ new DispatchStatus(_DispatchOK);
+
+ public static final int _DispatchUserException = 1;
+ public static final DispatchStatus DispatchUserException =
+ new DispatchStatus(_DispatchUserException);
+
+ public static final int _DispatchAsync = 2;
+ public static final DispatchStatus DispatchAsync =
+ new DispatchStatus(_DispatchAsync);
+
+ public static DispatchStatus
+ convert(int val)
+ {
+ assert val < 3;
+ return __values[val];
+ }
+
+ public int
+ value()
+ {
+ return __value;
+ }
+
+ private
+ DispatchStatus(int val)
+ {
+ __value = val;
+ __values[val] = this;
+ }
+}
diff --git a/java/src/Ice/Object.java b/java/src/Ice/Object.java
index e1d54bf9293..438e0886fa4 100644
--- a/java/src/Ice/Object.java
+++ b/java/src/Ice/Object.java
@@ -34,11 +34,11 @@ public interface Object
void ice_preMarshal();
void ice_postUnmarshal();
- IceInternal.DispatchStatus ice_dispatch(Request request, DispatchInterceptorAsyncCallback cb);
+ DispatchStatus ice_dispatch(Request request, DispatchInterceptorAsyncCallback cb);
- IceInternal.DispatchStatus __dispatch(IceInternal.Incoming in, Current current);
+ DispatchStatus __dispatch(IceInternal.Incoming in, Current current);
- IceInternal.DispatchStatus __collocDispatch(IceInternal.Direct request);
+ DispatchStatus __collocDispatch(IceInternal.Direct request);
void __write(IceInternal.BasicStream __os);
void __read(IceInternal.BasicStream __is, boolean __rid);
diff --git a/java/src/Ice/ObjectImpl.java b/java/src/Ice/ObjectImpl.java
index 970efadc15a..dfca5d6b3f3 100644
--- a/java/src/Ice/ObjectImpl.java
+++ b/java/src/Ice/ObjectImpl.java
@@ -54,7 +54,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
return s.equals(__ids[0]);
}
- public static IceInternal.DispatchStatus
+ public static DispatchStatus
___ice_isA(Ice.Object __obj, IceInternal.Incoming __inS, Current __current)
{
IceInternal.BasicStream __is = __inS.is();
@@ -62,7 +62,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
String __id = __is.readString();
boolean __ret = __obj.ice_isA(__id, __current);
__os.writeBool(__ret);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
public void
@@ -77,11 +77,11 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
// Nothing to do.
}
- public static IceInternal.DispatchStatus
+ public static DispatchStatus
___ice_ping(Ice.Object __obj, IceInternal.Incoming __inS, Current __current)
{
__obj.ice_ping(__current);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
public String[]
@@ -96,13 +96,13 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
return __ids;
}
- public static IceInternal.DispatchStatus
+ public static DispatchStatus
___ice_ids(Ice.Object __obj, IceInternal.Incoming __inS, Current __current)
{
IceInternal.BasicStream __os = __inS.os();
String[] __ret = __obj.ice_ids(__current);
__os.writeStringSeq(__ret);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
public String
@@ -117,13 +117,13 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
return __ids[0];
}
- public static IceInternal.DispatchStatus
+ public static DispatchStatus
___ice_id(Ice.Object __obj, IceInternal.Incoming __inS, Current __current)
{
IceInternal.BasicStream __os = __inS.os();
String __ret = __obj.ice_id(__current);
__os.writeString(__ret);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
public static String
@@ -155,7 +155,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
"ice_ping"
};
- public IceInternal.DispatchStatus
+ public DispatchStatus
ice_dispatch(Request request, DispatchInterceptorAsyncCallback cb)
{
if(request.isCollocated())
@@ -184,13 +184,13 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
}
}
- public IceInternal.DispatchStatus
+ public DispatchStatus
__dispatch(IceInternal.Incoming in, Current current)
{
int pos = java.util.Arrays.binarySearch(__all, current.operation);
if(pos < 0)
{
- return IceInternal.DispatchStatus.DispatchOperationNotExist;
+ throw new Ice.OperationNotExistException(current.id, current.facet, current.operation);
}
switch(pos)
@@ -214,10 +214,10 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
}
assert(false);
- return IceInternal.DispatchStatus.DispatchOperationNotExist;
+ throw new Ice.OperationNotExistException(current.id, current.facet, current.operation);
}
- public IceInternal.DispatchStatus
+ public DispatchStatus
__collocDispatch(IceInternal.Direct request)
{
return request.run(this);
diff --git a/java/src/Ice/_ObjectDelD.java b/java/src/Ice/_ObjectDelD.java
index bac5a082d06..c99eefc5dec 100644
--- a/java/src/Ice/_ObjectDelD.java
+++ b/java/src/Ice/_ObjectDelD.java
@@ -22,17 +22,17 @@ public class _ObjectDelD implements _ObjectDel
IceInternal.Direct __direct = new IceInternal.Direct(__current)
{
- public IceInternal.DispatchStatus run(Ice.Object __servant)
+ public DispatchStatus run(Ice.Object __servant)
{
__result.value = __servant.ice_isA(__id, __current);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
};
try
{
- IceInternal.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
- assert __status == IceInternal.DispatchStatus.DispatchOK;
+ DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
+ assert __status == DispatchStatus.DispatchOK;
return __result.value;
}
catch(Ice.LocalException __ex)
@@ -54,17 +54,17 @@ public class _ObjectDelD implements _ObjectDel
IceInternal.Direct __direct = new IceInternal.Direct(__current)
{
- public IceInternal.DispatchStatus run(Ice.Object __servant)
+ public DispatchStatus run(Ice.Object __servant)
{
__servant.ice_ping(__current);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
};
try
{
- IceInternal.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
- assert __status == IceInternal.DispatchStatus.DispatchOK;
+ DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
+ assert __status == DispatchStatus.DispatchOK;
}
catch(Ice.LocalException __ex)
{
@@ -87,16 +87,16 @@ public class _ObjectDelD implements _ObjectDel
IceInternal.Direct __direct = new IceInternal.Direct(__current)
{
- public IceInternal.DispatchStatus run(Ice.Object __servant)
+ public DispatchStatus run(Ice.Object __servant)
{
__result.value = __servant.ice_ids(__current);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
};
try
{
- IceInternal.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
- assert __status == IceInternal.DispatchStatus.DispatchOK;
+ DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
+ assert __status == DispatchStatus.DispatchOK;
return __result.value;
}
catch(Ice.LocalException __ex)
@@ -120,16 +120,16 @@ public class _ObjectDelD implements _ObjectDel
IceInternal.Direct __direct = new IceInternal.Direct(__current)
{
- public IceInternal.DispatchStatus run(Ice.Object __servant)
+ public DispatchStatus run(Ice.Object __servant)
{
__result.value = __servant.ice_id(__current);
- return IceInternal.DispatchStatus.DispatchOK;
+ return DispatchStatus.DispatchOK;
}
};
try
{
- IceInternal.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
- assert __status == IceInternal.DispatchStatus.DispatchOK;
+ DispatchStatus __status = __direct.servant().__collocDispatch(__direct);
+ assert __status == DispatchStatus.DispatchOK;
return __result.value;
}
catch(Ice.LocalException __ex)
diff --git a/java/src/IceInternal/Direct.java b/java/src/IceInternal/Direct.java
index ac58c1481b6..6fc57c275ee 100644
--- a/java/src/IceInternal/Direct.java
+++ b/java/src/IceInternal/Direct.java
@@ -11,7 +11,7 @@ package IceInternal;
public abstract class Direct implements Ice.Request
{
- public abstract DispatchStatus run(Ice.Object target);
+ public abstract Ice.DispatchStatus run(Ice.Object target);
public final boolean isCollocated()
{
diff --git a/java/src/IceInternal/DispatchStatus.java b/java/src/IceInternal/DispatchStatus.java
deleted file mode 100644
index ddf2813cd5f..00000000000
--- a/java/src/IceInternal/DispatchStatus.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-package IceInternal;
-
-public final class DispatchStatus
-{
- private static DispatchStatus[] __values = new DispatchStatus[9];
- private int __value;
-
- public static final int _DispatchOK = 0;
- public static final DispatchStatus DispatchOK =
- new DispatchStatus(_DispatchOK);
-
- public static final int _DispatchUserException = 1;
- public static final DispatchStatus DispatchUserException =
- new DispatchStatus(_DispatchUserException);
-
- public static final int _DispatchObjectNotExist = 2;
- public static final DispatchStatus DispatchObjectNotExist =
- new DispatchStatus(_DispatchObjectNotExist);
-
- public static final int _DispatchFacetNotExist = 3;
- public static final DispatchStatus DispatchFacetNotExist =
- new DispatchStatus(_DispatchFacetNotExist);
-
- public static final int _DispatchOperationNotExist = 4;
- public static final DispatchStatus DispatchOperationNotExist =
- new DispatchStatus(_DispatchOperationNotExist);
-
- public static final int _DispatchUnknownLocalException = 5;
- public static final DispatchStatus DispatchUnknownLocalException =
- new DispatchStatus(_DispatchUnknownLocalException);
-
- public static final int _DispatchUnknownUserException = 6;
- public static final DispatchStatus DispatchUnknownUserException =
- new DispatchStatus(_DispatchUnknownUserException);
-
- public static final int _DispatchUnknownException = 7;
- public static final DispatchStatus DispatchUnknownException =
- new DispatchStatus(_DispatchUnknownException);
-
- //
- // "Pseudo dispatch status", used internally only to indicate
- // async dispatch.
- //
- public static final int _DispatchAsync = 8;
- public static final DispatchStatus DispatchAsync =
- new DispatchStatus(_DispatchAsync);
-
- public static DispatchStatus
- convert(int val)
- {
- assert val < 9;
- return __values[val];
- }
-
- public int
- value()
- {
- return __value;
- }
-
- private
- DispatchStatus(int val)
- {
- __value = val;
- __values[val] = this;
- }
-}
diff --git a/java/src/IceInternal/Incoming.java b/java/src/IceInternal/Incoming.java
index b79dca5ffc0..8a07df1c3fb 100644
--- a/java/src/IceInternal/Incoming.java
+++ b/java/src/IceInternal/Incoming.java
@@ -107,14 +107,15 @@ final public class Incoming extends IncomingBase implements Ice.Request
if(_response)
{
- assert(_os.size() == Protocol.headerSize + 4); // Dispatch status position.
- _os.writeByte((byte)0);
+ assert(_os.size() == Protocol.headerSize + 4); // Reply status position.
+ _os.writeByte(ReplyStatus.replyOK);
_os.startWriteEncaps();
}
- // Initialize status to some value, to keep the compiler happy.
- DispatchStatus status = DispatchStatus.DispatchOK;
-
+ byte replyStatus = ReplyStatus.replyOK;
+
+ Ice.DispatchStatus dispatchStatus = Ice.DispatchStatus.DispatchOK;
+
//
// Don't put the code above into the try block below. Exceptions
// in the code above are considered fatal, and must propagate to
@@ -153,21 +154,25 @@ final public class Incoming extends IncomingBase implements Ice.Request
{
if(servantManager != null && servantManager.hasServant(_current.id))
{
- status = DispatchStatus.DispatchFacetNotExist;
+ replyStatus = ReplyStatus.replyFacetNotExist;
}
else
{
- status = DispatchStatus.DispatchObjectNotExist;
+ replyStatus = ReplyStatus.replyObjectNotExist;
}
}
else
{
- status = _servant.__dispatch(this, _current);
+ dispatchStatus = _servant.__dispatch(this, _current);
+ if(dispatchStatus == Ice.DispatchStatus.DispatchUserException)
+ {
+ replyStatus = ReplyStatus.replyUserException;
+ }
}
}
finally
{
- if(_locator != null && _servant != null && status != DispatchStatus.DispatchAsync)
+ if(_locator != null && _servant != null && dispatchStatus != Ice.DispatchStatus.DispatchAsync)
{
_locator.finished(_current, _servant, _cookie.value);
}
@@ -198,7 +203,7 @@ final public class Incoming extends IncomingBase implements Ice.Request
// DispatchAsync is "pseudo dispatch status", used internally
// only to indicate async dispatch.
//
- if(status == DispatchStatus.DispatchAsync)
+ if(dispatchStatus == Ice.DispatchStatus.DispatchAsync)
{
//
// If this was an asynchronous dispatch, we're done here.
@@ -210,14 +215,13 @@ final public class Incoming extends IncomingBase implements Ice.Request
{
_os.endWriteEncaps();
- if(status != DispatchStatus.DispatchOK && status != DispatchStatus.DispatchUserException)
+ if(replyStatus != ReplyStatus.replyOK && replyStatus != ReplyStatus.replyUserException)
{
- assert(status == DispatchStatus.DispatchObjectNotExist ||
- status == DispatchStatus.DispatchFacetNotExist ||
- status == DispatchStatus.DispatchOperationNotExist);
+ assert(replyStatus == ReplyStatus.replyObjectNotExist ||
+ replyStatus == ReplyStatus.replyFacetNotExist);
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)status.value());
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(replyStatus);
_current.id.__write(_os);
@@ -239,8 +243,8 @@ final public class Incoming extends IncomingBase implements Ice.Request
else
{
int save = _os.pos();
- _os.pos(Protocol.headerSize + 4); // Dispatch status position.
- _os.writeByte((byte)status.value());
+ _os.pos(Protocol.headerSize + 4); // Reply status position.
+ _os.writeByte(replyStatus);
_os.pos(save);
}
@@ -308,7 +312,7 @@ final public class Incoming extends IncomingBase implements Ice.Request
{
_os.endWriteEncaps();
_os.resize(Protocol.headerSize + 4, false);
- _os.writeByte((byte)0);
+ _os.writeByte(ReplyStatus.replyOK);
_os.startWriteEncaps();
}
}
diff --git a/java/src/IceInternal/IncomingAsync.java b/java/src/IceInternal/IncomingAsync.java
index 103284a12e2..acd29aeb375 100644
--- a/java/src/IceInternal/IncomingAsync.java
+++ b/java/src/IceInternal/IncomingAsync.java
@@ -61,15 +61,15 @@ public class IncomingAsync extends IncomingBase
_os.endWriteEncaps();
int save = _os.pos();
- _os.pos(Protocol.headerSize + 4); // Dispatch status position.
+ _os.pos(Protocol.headerSize + 4); // Reply status position.
if(ok)
{
- _os.writeByte((byte)DispatchStatus._DispatchOK);
+ _os.writeByte(ReplyStatus.replyOK);
}
else
{
- _os.writeByte((byte)DispatchStatus._DispatchUserException);
+ _os.writeByte(ReplyStatus.replyUserException);
}
_os.pos(save);
diff --git a/java/src/IceInternal/IncomingBase.java b/java/src/IceInternal/IncomingBase.java
index 2f15d424271..798835d0c86 100644
--- a/java/src/IceInternal/IncomingBase.java
+++ b/java/src/IceInternal/IncomingBase.java
@@ -184,18 +184,18 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
if(ex instanceof Ice.ObjectNotExistException)
{
- _os.writeByte((byte)DispatchStatus._DispatchObjectNotExist);
+ _os.writeByte(ReplyStatus.replyObjectNotExist);
}
else if(ex instanceof Ice.FacetNotExistException)
{
- _os.writeByte((byte)DispatchStatus._DispatchFacetNotExist);
+ _os.writeByte(ReplyStatus.replyFacetNotExist);
}
else if(ex instanceof Ice.OperationNotExistException)
{
- _os.writeByte((byte)DispatchStatus._DispatchOperationNotExist);
+ _os.writeByte(ReplyStatus.replyOperationNotExist);
}
else
{
@@ -235,8 +235,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownLocalException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownLocalException);
_os.writeString(ex.unknown);
_connection.sendResponse(_os, _compress);
}
@@ -255,8 +255,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownUserException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownUserException);
_os.writeString(ex.unknown);
_connection.sendResponse(_os, _compress);
}
@@ -275,8 +275,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownException);
_os.writeString(ex.unknown);
_connection.sendResponse(_os, _compress);
}
@@ -295,8 +295,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownLocalException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownLocalException);
//_os.writeString(ex.toString());
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
@@ -320,8 +320,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownUserException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownUserException);
//_os.writeString(ex.toString());
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
@@ -345,8 +345,8 @@ public class IncomingBase
if(_response)
{
_os.endWriteEncaps();
- _os.resize(Protocol.headerSize + 4, false); // Dispatch status position.
- _os.writeByte((byte)DispatchStatus._DispatchUnknownException);
+ _os.resize(Protocol.headerSize + 4, false); // Reply status position.
+ _os.writeByte(ReplyStatus.replyUnknownException);
//_os.writeString(ex.toString());
java.io.StringWriter sw = new java.io.StringWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(sw);
diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java
index 0b684ac7c8f..85cf0c1ce9b 100644
--- a/java/src/IceInternal/Outgoing.java
+++ b/java/src/IceInternal/Outgoing.java
@@ -250,11 +250,11 @@ public final class Outgoing
assert(_state <= StateInProgress);
_is.swap(is);
- int status = (int)_is.readByte();
+ byte replyStatus = _is.readByte();
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchOK:
+ case ReplyStatus.replyOK:
{
//
// Input and output parameters are always sent in an
@@ -266,7 +266,7 @@ public final class Outgoing
break;
}
- case DispatchStatus._DispatchUserException:
+ case ReplyStatus.replyUserException:
{
//
// Input and output parameters are always sent in an
@@ -278,26 +278,26 @@ public final class Outgoing
break;
}
- case DispatchStatus._DispatchObjectNotExist:
- case DispatchStatus._DispatchFacetNotExist:
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyObjectNotExist:
+ case ReplyStatus.replyFacetNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
Ice.RequestFailedException ex = null;
- switch((int)status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchObjectNotExist:
+ case ReplyStatus.replyObjectNotExist:
{
ex = new Ice.ObjectNotExistException();
break;
}
- case DispatchStatus._DispatchFacetNotExist:
+ case ReplyStatus.replyFacetNotExist:
{
ex = new Ice.FacetNotExistException();
break;
}
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
ex = new Ice.OperationNotExistException();
break;
@@ -337,26 +337,26 @@ public final class Outgoing
break;
}
- case DispatchStatus._DispatchUnknownException:
- case DispatchStatus._DispatchUnknownLocalException:
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownException:
+ case ReplyStatus.replyUnknownLocalException:
+ case ReplyStatus.replyUnknownUserException:
{
Ice.UnknownException ex = null;
- switch((int)status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchUnknownException:
+ case ReplyStatus.replyUnknownException:
{
ex = new Ice.UnknownException();
break;
}
- case DispatchStatus._DispatchUnknownLocalException:
+ case ReplyStatus.replyUnknownLocalException:
{
ex = new Ice.UnknownLocalException();
break;
}
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownUserException:
{
ex = new Ice.UnknownUserException();
break;
diff --git a/java/src/IceInternal/OutgoingAsync.java b/java/src/IceInternal/OutgoingAsync.java
index d7a9af5d4d7..fa9e22315d1 100644
--- a/java/src/IceInternal/OutgoingAsync.java
+++ b/java/src/IceInternal/OutgoingAsync.java
@@ -23,26 +23,26 @@ public abstract class OutgoingAsync
{
synchronized(_monitor)
{
- int status;
+ byte replyStatus;
try
{
__is.swap(is);
- status = (int)__is.readByte();
+ replyStatus = __is.readByte();
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchOK:
- case DispatchStatus._DispatchUserException:
+ case ReplyStatus.replyOK:
+ case ReplyStatus.replyUserException:
{
__is.startReadEncaps();
break;
}
- case DispatchStatus._DispatchObjectNotExist:
- case DispatchStatus._DispatchFacetNotExist:
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyObjectNotExist:
+ case ReplyStatus.replyFacetNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
Ice.Identity id = new Ice.Identity();
id.__read(__is);
@@ -68,21 +68,21 @@ public abstract class OutgoingAsync
String operation = __is.readString();
Ice.RequestFailedException ex = null;
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchObjectNotExist:
+ case ReplyStatus.replyObjectNotExist:
{
ex = new Ice.ObjectNotExistException();
break;
}
- case DispatchStatus._DispatchFacetNotExist:
+ case ReplyStatus.replyFacetNotExist:
{
ex = new Ice.FacetNotExistException();
break;
}
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
ex = new Ice.OperationNotExistException();
break;
@@ -101,28 +101,28 @@ public abstract class OutgoingAsync
throw ex;
}
- case DispatchStatus._DispatchUnknownException:
- case DispatchStatus._DispatchUnknownLocalException:
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownException:
+ case ReplyStatus.replyUnknownLocalException:
+ case ReplyStatus.replyUnknownUserException:
{
String unknown = __is.readString();
Ice.UnknownException ex = null;
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchUnknownException:
+ case ReplyStatus.replyUnknownException:
{
ex = new Ice.UnknownException();
break;
}
- case DispatchStatus._DispatchUnknownLocalException:
+ case ReplyStatus.replyUnknownLocalException:
{
ex = new Ice.UnknownLocalException();
break;
}
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownUserException:
{
ex = new Ice.UnknownUserException();
break;
@@ -151,11 +151,11 @@ public abstract class OutgoingAsync
return;
}
- assert(status == DispatchStatus._DispatchOK || status == DispatchStatus._DispatchUserException);
+ assert(replyStatus == ReplyStatus.replyOK || replyStatus == ReplyStatus.replyUserException);
try
{
- __response(status == DispatchStatus._DispatchOK);
+ __response(replyStatus == ReplyStatus.replyOK);
}
catch(java.lang.Exception ex)
{
diff --git a/java/src/IceInternal/ReplyStatus.java b/java/src/IceInternal/ReplyStatus.java
new file mode 100644
index 00000000000..a8598eccb06
--- /dev/null
+++ b/java/src/IceInternal/ReplyStatus.java
@@ -0,0 +1,22 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package IceInternal;
+
+interface ReplyStatus
+{
+ static final byte replyOK = 0;
+ static final byte replyUserException = 1;
+ static final byte replyObjectNotExist = 2;
+ static final byte replyFacetNotExist = 3;
+ static final byte replyOperationNotExist = 4;
+ static final byte replyUnknownLocalException = 5;
+ static final byte replyUnknownUserException = 6;
+ static final byte replyUnknownException = 7;
+}
diff --git a/java/src/IceInternal/TraceUtil.java b/java/src/IceInternal/TraceUtil.java
index 6b57b96c540..7a81793ffdc 100644
--- a/java/src/IceInternal/TraceUtil.java
+++ b/java/src/IceInternal/TraceUtil.java
@@ -96,42 +96,42 @@ public final class TraceUtil
int requestId = str.readInt();
s.write("\nrequest id = " + requestId);
- byte status = str.readByte();
- s.write("\nreply status = " + (int)status + ' ');
+ byte replyStatus = str.readByte();
+ s.write("\nreply status = " + (int)replyStatus + ' ');
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchOK:
+ case ReplyStatus.replyOK:
{
s.write("(ok)");
break;
}
- case DispatchStatus._DispatchUserException:
+ case ReplyStatus.replyUserException:
{
s.write("(user exception)");
break;
}
- case DispatchStatus._DispatchObjectNotExist:
- case DispatchStatus._DispatchFacetNotExist:
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyObjectNotExist:
+ case ReplyStatus.replyFacetNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchObjectNotExist:
+ case ReplyStatus.replyObjectNotExist:
{
s.write("(object not exist)");
break;
}
- case DispatchStatus._DispatchFacetNotExist:
+ case ReplyStatus.replyFacetNotExist:
{
s.write("(facet not exist)");
break;
}
- case DispatchStatus._DispatchOperationNotExist:
+ case ReplyStatus.replyOperationNotExist:
{
s.write("(operation not exist)");
break;
@@ -148,25 +148,25 @@ public final class TraceUtil
break;
}
- case DispatchStatus._DispatchUnknownException:
- case DispatchStatus._DispatchUnknownLocalException:
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownException:
+ case ReplyStatus.replyUnknownLocalException:
+ case ReplyStatus.replyUnknownUserException:
{
- switch(status)
+ switch(replyStatus)
{
- case DispatchStatus._DispatchUnknownException:
+ case ReplyStatus.replyUnknownException:
{
s.write("(unknown exception)");
break;
}
- case DispatchStatus._DispatchUnknownLocalException:
+ case ReplyStatus.replyUnknownLocalException:
{
s.write("(unknown local exception)");
break;
}
- case DispatchStatus._DispatchUnknownUserException:
+ case ReplyStatus.replyUnknownUserException:
{
s.write("(unknown user exception)");
break;
diff --git a/java/test/Ice/build.xml b/java/test/Ice/build.xml
index e79c105d6bb..25a4e4b71a9 100644
--- a/java/test/Ice/build.xml
+++ b/java/test/Ice/build.xml
@@ -51,6 +51,8 @@
<ant dir="inheritance" target="clean"/>
<ant dir="location" target="clean"/>
<ant dir="objects" target="clean"/>
+ <ant dir="proxy" target="clean"/>
+ <ant dir="proxyAMD" target="clean"/>
<ant dir="operations" target="clean"/>
<ant dir="operationsAMD" target="clean"/>
<ant dir="slicing" target="clean"/>
diff --git a/java/test/Ice/interceptor/AMDInterceptorI.java b/java/test/Ice/interceptor/AMDInterceptorI.java
index 72d1ffe4c41..73860a4ddf2 100644
--- a/java/test/Ice/interceptor/AMDInterceptorI.java
+++ b/java/test/Ice/interceptor/AMDInterceptorI.java
@@ -18,7 +18,7 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
super(servant);
}
- public IceInternal.DispatchStatus
+ public Ice.DispatchStatus
dispatch(Ice.Request request)
{
Ice.Current current = request.getCurrent();
@@ -44,7 +44,7 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
};
_lastStatus = _servant.ice_dispatch(request, cb);
- test(_lastStatus == IceInternal.DispatchStatus.DispatchAsync);
+ test(_lastStatus == Ice.DispatchStatus.DispatchAsync);
}
request.getCurrent().ctx.put("retry", "no");
@@ -57,7 +57,7 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
public boolean response(boolean ok)
{
- setActualStatus(ok ? IceInternal.DispatchStatus.DispatchOK : IceInternal.DispatchStatus.DispatchUserException);
+ setActualStatus(ok ? Ice.DispatchStatus.DispatchOK : Ice.DispatchStatus.DispatchUserException);
return true;
}
@@ -80,7 +80,7 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
synchronized void
- setActualStatus(IceInternal.DispatchStatus status)
+ setActualStatus(Ice.DispatchStatus status)
{
_actualStatus = status;
_exception = null;
@@ -93,7 +93,7 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
_actualStatus = null;
}
- synchronized IceInternal.DispatchStatus
+ synchronized Ice.DispatchStatus
getActualStatus()
{
return _actualStatus;
@@ -105,6 +105,6 @@ class AMDInterceptorI extends InterceptorI implements Ice.DispatchInterceptorAsy
return _exception;
}
- private IceInternal.DispatchStatus _actualStatus;
+ private Ice.DispatchStatus _actualStatus;
private java.lang.Exception _exception;
-} \ No newline at end of file
+}
diff --git a/java/test/Ice/interceptor/Client.java b/java/test/Ice/interceptor/Client.java
index 18178fefe75..0a710d13b13 100644
--- a/java/test/Ice/interceptor/Client.java
+++ b/java/test/Ice/interceptor/Client.java
@@ -25,15 +25,24 @@ public class Client extends Ice.Application
System.out.flush();
test(interceptor.getLastOperation() == null);
test(interceptor.getLastStatus() == null);
+ prx.ice_ping();
+ test(interceptor.getLastOperation().equals("ice_ping"));
+ test(interceptor.getLastStatus() == Ice.DispatchStatus.DispatchOK);
+ String typeId = prx.ice_id();
+ test(interceptor.getLastOperation().equals("ice_id"));
+ test(interceptor.getLastStatus() == Ice.DispatchStatus.DispatchOK);
+ test(prx.ice_isA(typeId));
+ test(interceptor.getLastOperation().equals("ice_isA"));
+ test(interceptor.getLastStatus() == Ice.DispatchStatus.DispatchOK);
test(prx.add(33, 12) == 45);
test(interceptor.getLastOperation().equals("add"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchOK));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchOK));
System.out.println("ok");
System.out.print("testing retry...");
System.out.flush();
test(prx.addWithRetry(33, 12) == 45);
test(interceptor.getLastOperation().equals("addWithRetry"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchOK));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchOK));
System.out.println("ok");
System.out.print("testing user exception...");
System.out.flush();
@@ -47,7 +56,7 @@ public class Client extends Ice.Application
// expected
}
test(interceptor.getLastOperation().equals("badAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchUserException));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchUserException));
System.out.println("ok");
System.out.print("testing ONE...");
System.out.flush();
@@ -89,7 +98,7 @@ public class Client extends Ice.Application
System.out.flush();
test(prx.amdAdd(33, 12) == 45);
test(interceptor.getLastOperation().equals("amdAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
System.out.println("ok");
}
return 0;
@@ -104,15 +113,15 @@ public class Client extends Ice.Application
test(interceptor.getLastStatus() == null);
test(prx.amdAdd(33, 12) == 45);
test(interceptor.getLastOperation().equals("amdAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
- test(interceptor.getActualStatus().equals(IceInternal.DispatchStatus.DispatchOK));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
+ test(interceptor.getActualStatus().equals(Ice.DispatchStatus.DispatchOK));
System.out.println("ok");
System.out.print("testing retry...");
System.out.flush();
test(prx.amdAddWithRetry(33, 12) == 45);
test(interceptor.getLastOperation().equals("amdAddWithRetry"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
- test(interceptor.getActualStatus().equals(IceInternal.DispatchStatus.DispatchOK));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
+ test(interceptor.getActualStatus().equals(Ice.DispatchStatus.DispatchOK));
System.out.println("ok");
System.out.print("testing user exception...");
System.out.flush();
@@ -126,8 +135,8 @@ public class Client extends Ice.Application
// expected
}
test(interceptor.getLastOperation().equals("amdBadAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
- test(interceptor.getActualStatus().equals(IceInternal.DispatchStatus.DispatchUserException));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
+ test(interceptor.getActualStatus().equals(Ice.DispatchStatus.DispatchUserException));
System.out.println("ok");
System.out.print("testing ONE...");
System.out.flush();
@@ -142,7 +151,7 @@ public class Client extends Ice.Application
// expected
}
test(interceptor.getLastOperation().equals("amdNotExistAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
test(interceptor.getActualStatus() == null);
test(interceptor.getException() instanceof Ice.ObjectNotExistException);
System.out.println("ok");
@@ -159,7 +168,7 @@ public class Client extends Ice.Application
test(!prx.ice_isCollocationOptimized());
}
test(interceptor.getLastOperation().equals("amdBadSystemAdd"));
- test(interceptor.getLastStatus().equals(IceInternal.DispatchStatus.DispatchAsync));
+ test(interceptor.getLastStatus().equals(Ice.DispatchStatus.DispatchAsync));
test(interceptor.getActualStatus() == null);
test(interceptor.getException() instanceof Ice.InitializationException);
System.out.println("ok");
diff --git a/java/test/Ice/interceptor/InterceptorI.java b/java/test/Ice/interceptor/InterceptorI.java
index a323ade0e2c..a677c5a3d89 100644
--- a/java/test/Ice/interceptor/InterceptorI.java
+++ b/java/test/Ice/interceptor/InterceptorI.java
@@ -24,7 +24,7 @@ class InterceptorI extends Ice.DispatchInterceptor
}
- public IceInternal.DispatchStatus
+ public Ice.DispatchStatus
dispatch(Ice.Request request)
{
Ice.Current current = request.getCurrent();
@@ -54,7 +54,7 @@ class InterceptorI extends Ice.DispatchInterceptor
return _lastStatus;
}
- IceInternal.DispatchStatus
+ Ice.DispatchStatus
getLastStatus()
{
return _lastStatus;
@@ -75,5 +75,5 @@ class InterceptorI extends Ice.DispatchInterceptor
protected final Ice.Object _servant;
protected String _lastOperation;
- protected IceInternal.DispatchStatus _lastStatus;
+ protected Ice.DispatchStatus _lastStatus;
}