KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > test > bugs > bug384 > TestObjectImpl


1 package org.jacorb.test.bugs.bug384;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1997-2003 Gerald Brose.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 import junit.framework.*;
24
25 import org.omg.CORBA.*;
26 import org.omg.CosNaming.*;
27
28 /**
29  * Implementation of a test object that can be "ping()-ed"
30  *
31  * @author Gerald Brose
32  * @version $Id: TestObjectImpl.java,v 1.2 2003/10/30 10:03:13 nick.cross Exp $
33  */

34
35 public class TestObjectImpl
36     extends TestObjectPOA
37 {
38     public TestObjectImpl()
39     {}
40
41     public void ping()
42     {}
43
44     public A[] testMarshall()
45     {
46         A[] result = new A[2];
47
48         // This will simulate starting and stopping an A server.
49
result[0] = AHelper.narrow ((ORB.init( new String JavaDoc[0], null)).string_to_object ("IOR:000000000000002649444C3A6F72672F6A61636F72622F746573742F627567732F6275673338342F413A312E30000000000000020000000000000064000102000000000E3231332E34382E39312E31353700DD770000001041496D706C2F00112A0B024A40214A1E000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001" ) );
50         result[1] = BHelper.narrow ((ORB.init( new String JavaDoc[0], null)).string_to_object ("IOR:000000000000002649444C3A6F72672F6A61636F72622F746573742F627567732F6275673338342F423A312E30000000000000020000000000000064000102000000000E3231332E34382E39312E31353700F0C10000001042496D706C2F00112A0B0704022A0A0E000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001" ) );
51
52         return result;
53     }
54 }
55
Popular Tags