summaryrefslogtreecommitdiff
path: root/java/demo/Ice/throughput/ThroughputI.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-03-01 17:15:21 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-03-01 17:15:21 +0000
commitb2de273e12d4496644c5865bd0c87828b2a79973 (patch)
tree84787d7503b8db09a997a36965d3b29fc647fe3b /java/demo/Ice/throughput/ThroughputI.java
parentfix (diff)
downloadice-b2de273e12d4496644c5865bd0c87828b2a79973.tar.bz2
ice-b2de273e12d4496644c5865bd0c87828b2a79973.tar.xz
ice-b2de273e12d4496644c5865bd0c87828b2a79973.zip
Ported new throughput demo
Diffstat (limited to 'java/demo/Ice/throughput/ThroughputI.java')
-rw-r--r--java/demo/Ice/throughput/ThroughputI.java68
1 files changed, 62 insertions, 6 deletions
diff --git a/java/demo/Ice/throughput/ThroughputI.java b/java/demo/Ice/throughput/ThroughputI.java
index 826049af283..d31b91fdac1 100644
--- a/java/demo/Ice/throughput/ThroughputI.java
+++ b/java/demo/Ice/throughput/ThroughputI.java
@@ -14,7 +14,32 @@ public final class ThroughputI extends _ThroughputDisp
public
ThroughputI()
{
- _seq = new byte[seqSize.value];
+ _byteSeq = new byte[ByteSeqSize.value];
+
+ _stringSeq = new String[StringSeqSize.value];
+ for(int i = 0; i < StringSeqSize.value; ++i)
+ {
+ _stringSeq[i] = "hello";
+ }
+
+ _structSeq = new StringDouble[StringDoubleSeqSize.value];
+ for(int i = 0; i < StringDoubleSeqSize.value; ++i)
+ {
+ _structSeq[i] = new StringDouble();
+ _structSeq[i].s = "hello";
+ _structSeq[i].d = 3.14;
+ }
+ }
+
+ public void
+ sendByteSeq(byte[] seq, Ice.Current current)
+ {
+ }
+
+ public byte[]
+ recvByteSeq(Ice.Current current)
+ {
+ return _byteSeq;
}
public byte[]
@@ -23,16 +48,47 @@ public final class ThroughputI extends _ThroughputDisp
return seq;
}
- public byte[]
- recvByteSeq(Ice.Current current)
+ public void
+ sendStringSeq(String[] seq, Ice.Current current)
+ {
+ }
+
+ public String[]
+ recvStringSeq(Ice.Current current)
{
- return _seq;
+ return _stringSeq;
+ }
+
+ public String[]
+ echoStringSeq(String[] seq, Ice.Current current)
+ {
+ return seq;
}
public void
- sendByteSeq(byte[] seq, Ice.Current current)
+ sendStructSeq(StringDouble[] seq, Ice.Current current)
+ {
+ }
+
+ public StringDouble[]
+ recvStructSeq(Ice.Current current)
+ {
+ return _structSeq;
+ }
+
+ public StringDouble[]
+ echoStructSeq(StringDouble[] seq, Ice.Current current)
+ {
+ return seq;
+ }
+
+ public void
+ shutdown(Ice.Current current)
{
+ current.adapter.getCommunicator().shutdown();
}
- private byte[] _seq;
+ private byte[] _byteSeq;
+ private String[] _stringSeq;
+ private StringDouble[] _structSeq;
}