KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > test > orb > etf > wiop > WIOPProfile


1 package org.jacorb.test.orb.etf.wiop;
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 org.omg.ETF.*;
24 import org.omg.GIOP.Version;
25 import org.omg.IOP.*;
26
27 /**
28  * @author <a HREF="mailto:spiegel@gnu.org">Andre Spiegel</a>
29  * @version $Id: WIOPProfile.java,v 1.1 2003/07/11 00:20:33 andre.spiegel Exp $
30  */

31 public class WIOPProfile extends _ProfileLocalBase
32 {
33     private int tag = 0;
34     private Profile delegate = null;
35     
36     public WIOPProfile (Profile delegate, int tag)
37     {
38         this.delegate = delegate;
39         this.tag = tag;
40     }
41
42     public Profile getDelegate()
43     {
44         return delegate;
45     }
46
47     public void marshal (TaggedProfileHolder tagged_profile,
48                          TaggedComponentSeqHolder components)
49     {
50         delegate.marshal (tagged_profile, components);
51         tagged_profile.value.tag = this.tag();
52     }
53
54     public int hash()
55     {
56         return delegate.hash();
57     }
58
59     public Profile copy()
60     {
61         return new WIOPProfile (delegate.copy(), tag);
62     }
63
64     public boolean is_match (Profile prof)
65     {
66         return delegate.is_match (prof);
67     }
68
69     public Version version()
70     {
71         return delegate.version();
72     }
73
74     public void set_object_key(byte[] key)
75     {
76         delegate.set_object_key (key);
77     }
78
79     public byte[] get_object_key()
80     {
81         return delegate.get_object_key();
82     }
83
84     public int tag()
85     {
86         return this.tag;
87     }
88
89 }
90
Popular Tags