summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2016-09-07 13:24:41 -0700
committerMark Spruiell <mes@zeroc.com>2016-09-07 13:24:41 -0700
commit0d0e2f6f6d0738fecae4b4f19efda9319fbb6296 (patch)
tree58cfb65f027929e17d4d44702926b2fd08335df3 /java/src
parentFixed ICE-7279 - Fixed input stream to use zero-copy for string reads if ther... (diff)
downloadice-0d0e2f6f6d0738fecae4b4f19efda9319fbb6296.tar.bz2
ice-0d0e2f6f6d0738fecae4b4f19efda9319fbb6296.tar.xz
ice-0d0e2f6f6d0738fecae4b4f19efda9319fbb6296.zip
ICE-7321 - Java cross-test failure in Ice/objects
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java b/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java
new file mode 100644
index 00000000000..f3757a8817e
--- /dev/null
+++ b/java/src/Ice/src/main/java/com/zeroc/Ice/InterfaceByValue.java
@@ -0,0 +1,54 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2016 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 com.zeroc.Ice;
+
+/**
+ * Base class for interoperating with existing applications that pass interfaces by value.
+ **/
+public class InterfaceByValue extends Value
+{
+ /**
+ * The constructor accepts the Slice type ID of the interface being passed by value.
+ *
+ * @param id The Slice type ID of the interface.
+ **/
+ public InterfaceByValue(String id)
+ {
+ _id = id;
+ }
+
+ /**
+ * Returns the Slice type ID of the interface being passed by value.
+ *
+ * @return The Slice type ID.
+ **/
+ public String ice_id()
+ {
+ return _id;
+ }
+
+ @Override
+ protected void __writeImpl(OutputStream __os)
+ {
+ __os.startSlice(ice_id(), -1, true);
+ __os.endSlice();
+ }
+
+ @Override
+ protected void __readImpl(InputStream __is)
+ {
+ __is.startSlice();
+ __is.endSlice();
+ }
+
+ public static final long serialVersionUID = 0L;
+
+ private String _id;
+}