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

« back to all changes in this revision

Viewing changes to java/test/Ice/defaultServant/MyObjectI.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
// **********************************************************************
 
2
//
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
4
//
 
5
// This copy of Ice is licensed to you under the terms described in the
 
6
// ICE_LICENSE file included in this distribution.
 
7
//
 
8
// **********************************************************************
 
9
 
 
10
package test.Ice.defaultServant;
 
11
import test.Ice.defaultServant.Test.*;
 
12
 
 
13
public final class MyObjectI extends _MyObjectDisp
 
14
{
 
15
    public void
 
16
    ice_ping(Ice.Current current)
 
17
    {
 
18
        String name = current.id.name;
 
19
 
 
20
        if(name == "ObjectNotExist")
 
21
        {
 
22
            throw new Ice.ObjectNotExistException();
 
23
        }
 
24
        else if(name == "FacetNotExist")
 
25
        {
 
26
            throw new Ice.FacetNotExistException();
 
27
        }
 
28
    }
 
29
 
 
30
    public String
 
31
    getName(Ice.Current current)
 
32
    {
 
33
        String name = current.id.name;
 
34
 
 
35
        if(name == "ObjectNotExist")
 
36
        {
 
37
            throw new Ice.ObjectNotExistException();
 
38
        }
 
39
        else if(name == "FacetNotExist")
 
40
        {
 
41
            throw new Ice.FacetNotExistException();
 
42
        }
 
43
 
 
44
        return name;
 
45
    }
 
46
}