~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to java/test/Ice/udp/TestIntfI.java

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// **********************************************************************
2
2
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
4
4
//
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
7
7
//
8
8
// **********************************************************************
9
9
 
10
 
public final class TestIntfI extends Test._TestIntfDisp
 
10
package test.Ice.udp;
 
11
 
 
12
import test.Ice.udp.Test.*;
 
13
 
 
14
public final class TestIntfI extends _TestIntfDisp
11
15
{
12
 
    public void ping(Test.PingReplyPrx reply, Ice.Current current)
13
 
    {
14
 
        try
15
 
        {
16
 
            reply.reply();
17
 
        }
18
 
        catch(Ice.LocalException ex)
19
 
        {
20
 
            assert(false);
21
 
        }
22
 
    }
23
 
 
24
 
    public void sendByteSeq(byte[] seq, Test.PingReplyPrx reply, Ice.Current current)
25
 
    {
26
 
        try
27
 
        {
28
 
            reply.reply();
 
16
    public void ping(PingReplyPrx reply, Ice.Current current)
 
17
    {
 
18
        try
 
19
        {
 
20
            reply.reply();
 
21
        }
 
22
        catch(Ice.LocalException ex)
 
23
        {
 
24
            assert(false);
 
25
        }
 
26
    }
 
27
 
 
28
    public void sendByteSeq(byte[] seq, PingReplyPrx reply, Ice.Current current)
 
29
    {
 
30
        try
 
31
        {
 
32
            reply.reply();
 
33
        }
 
34
        catch(Ice.LocalException ex)
 
35
        {
 
36
            assert(false);
 
37
        }
 
38
    }
 
39
 
 
40
    public void pingBiDir(Ice.Identity id, Ice.Current current)
 
41
    {
 
42
        try
 
43
        {
 
44
            //
 
45
            // Ensure sending too much data doesn't cause the UDP connection
 
46
            // to be closed.
 
47
            //
 
48
            try
 
49
            {
 
50
                byte[] seq = new byte[32 * 1024];
 
51
                TestIntfPrxHelper.uncheckedCast(current.con.createProxy(id)).sendByteSeq(seq, null);
 
52
            }
 
53
            catch(Ice.DatagramLimitException ex)
 
54
            {
 
55
                // Expected.
 
56
            }
 
57
 
 
58
            PingReplyPrxHelper.uncheckedCast(current.con.createProxy(id)).reply();
29
59
        }
30
60
        catch(Ice.LocalException ex)
31
61
        {