summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-26 09:33:18 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-26 09:33:18 +0000
commit0d688b142e608d2913bd05735c4be9d9c5ecfa3e (patch)
tree00317abfa944e01a2d3f6c15a82e0ee957d54948 /org
parenta8cc29f82a0378b510db4a8e9608f1dd8b7aa176 (diff)
downloadclasspath-0d688b142e608d2913bd05735c4be9d9c5ecfa3e.tar.gz
2005-10-26 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* org/omg/PortableInterceptor/AdapterManagerIdHelper.java, org/omg/PortableInterceptor/AdapterNameHelper.java, org/omg/PortableInterceptor/AdapterStateHelper.java, org/omg/PortableInterceptor/ORBIdHelper.java, org/omg/PortableInterceptor/ObjectIdHelper.java, org/omg/PortableInterceptor/ServerIdHelper.java: New files. * org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java (type): Fixed typo in typecode name.
Diffstat (limited to 'org')
-rw-r--r--org/omg/PortableInterceptor/AdapterManagerIdHelper.java119
-rw-r--r--org/omg/PortableInterceptor/AdapterNameHelper.java144
-rw-r--r--org/omg/PortableInterceptor/AdapterStateHelper.java119
-rw-r--r--org/omg/PortableInterceptor/ORBIdHelper.java119
-rw-r--r--org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java6
-rw-r--r--org/omg/PortableInterceptor/ObjectIdHelper.java119
-rw-r--r--org/omg/PortableInterceptor/ServerIdHelper.java119
7 files changed, 742 insertions, 3 deletions
diff --git a/org/omg/PortableInterceptor/AdapterManagerIdHelper.java b/org/omg/PortableInterceptor/AdapterManagerIdHelper.java
new file mode 100644
index 000000000..f3f7e6441
--- /dev/null
+++ b/org/omg/PortableInterceptor/AdapterManagerIdHelper.java
@@ -0,0 +1,119 @@
+/* AdapterManagerIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the adapter manager id. An adapter manager id is an
+ * integer constant and needs no helper, but the one is included anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterManagerIdHelper
+{
+ /**
+ * Create the AdapterManagerId typecode (alias of CORBA long (java int),
+ * named "AdapterManagerId").
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc(id(), "AdapterManagerId",
+ orb.get_primitive_tc(TCKind.tk_long)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_long(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_long();
+ }
+
+ /**
+ * Get the adapter manager id repository id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/AdapterManagerId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/AdapterManagerId:1.0";
+ }
+
+ /**
+ * Read the int (adapter manager id) from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_long();
+ }
+
+ /**
+ * Write the int (adapter manager id) to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_long(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/AdapterNameHelper.java b/org/omg/PortableInterceptor/AdapterNameHelper.java
new file mode 100644
index 000000000..134d87d49
--- /dev/null
+++ b/org/omg/PortableInterceptor/AdapterNameHelper.java
@@ -0,0 +1,144 @@
+/* AdapterNameHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StringSeqHelper;
+import org.omg.CORBA.StringSeqHolder;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with the adapter name helper.
+ * The adapter name helper is an array of strings, so {@link StringSeqHelper}
+ * could be used for io operations. The separate helper is provided anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterNameHelper
+{
+
+ /**
+ * The cached typecode, computed once.
+ */
+ static TypeCode typecode;
+
+ /**
+ * Extract the adapter name (<code>String[]</code>) from the given {@link Any}.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ */
+ public static String[] extract(Any a)
+ {
+ StringSeqHolder h = (StringSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/AdapterName:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/AdapterName:1.0";
+ }
+
+ /**
+ * Insert into the given adapter name (<code>String[]</code>) into the
+ * given {@link Any}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, String[] that)
+ {
+ StringSeqHolder holder = new StringSeqHolder(that);
+ into.insert_Streamable(holder);
+ into.type(type());
+ }
+
+ /**
+ * Reads the <code>String[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA stream to read from.
+ * @return the value from the stream.
+ */
+ public static String[] read(InputStream input)
+ {
+ return StringSeqHelper.read(input);
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the adapter name.
+ *
+ * @return the alias of the string sequence, named "AdapterName".
+ */
+ public static TypeCode type()
+ {
+ if (typecode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+
+ TypeCode component = orb.create_string_tc(0);
+ typecode = orb.create_alias_tc(id(), "AdapterName", component);
+ }
+ return typecode;
+ }
+
+ /**
+ * Writes the <code>String[]</code> into the given stream.
+ *
+ * @param output the CORBA output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, String[] value)
+ {
+ StringSeqHelper.write(output, value);
+ }
+}
diff --git a/org/omg/PortableInterceptor/AdapterStateHelper.java b/org/omg/PortableInterceptor/AdapterStateHelper.java
new file mode 100644
index 000000000..ceb7ac8d5
--- /dev/null
+++ b/org/omg/PortableInterceptor/AdapterStateHelper.java
@@ -0,0 +1,119 @@
+/* AdapterStateHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the adapter state. An adapter state is an
+ * short integer constant and needs no helper, but the one is included anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterStateHelper
+{
+ /**
+ * Create the AdapterState typecode (alias of <code>short</code>,
+ * named "AdapterState").
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc(id(), "AdapterState",
+ orb.get_primitive_tc(TCKind.tk_short)
+ );
+ }
+
+ /**
+ * Insert the <code>short</code> into the given Any.
+ */
+ public static void insert(Any any, short that)
+ {
+ any.insert_short(that);
+ }
+
+ /**
+ * Extract the <code>short</code> from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static short extract(Any any)
+ {
+ return any.extract_short();
+ }
+
+ /**
+ * Get the adapter state repository id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/AdapterState:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/AdapterState:1.0";
+ }
+
+ /**
+ * Read the <code>short</code> (adapter state) from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static short read(InputStream input)
+ {
+ return input.read_short();
+ }
+
+ /**
+ * Write the <code>short</code> (adapter state) to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, short value)
+ {
+ output.write_short(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/ORBIdHelper.java b/org/omg/PortableInterceptor/ORBIdHelper.java
new file mode 100644
index 000000000..e561669f7
--- /dev/null
+++ b/org/omg/PortableInterceptor/ORBIdHelper.java
@@ -0,0 +1,119 @@
+/* ORBIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The ORB Id is defined in OMG specification just as a narrow (not wide)
+ * string. As such, the ORB Id needs no helper, but one is included in
+ * the API anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ORBIdHelper
+{
+ /**
+ * Insert the ORB Id into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the ORB Id from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an alias typecode.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "ORBId", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the ORB Id repository id.
+ * @return "IDL:omg.org/PortableInterceptor/ORBId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ORBId:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param input the stream to read from.
+ */
+ public static String read(InputStream input)
+ {
+ return input.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param output the stream to write into.
+ * @param value the string (ORB Id) value to write.
+ */
+ public static void write(OutputStream output, String value)
+ {
+ output.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java b/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java
index d0946e3fa..17ad95d78 100644
--- a/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java
+++ b/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java
@@ -82,7 +82,7 @@ public class ObjectIdHelper
public static TypeCode type()
{
ORB orb = Restricted_ORB.Singleton;
- return orb.create_alias_tc(id(), "Object Id", orb.create_string_tc(0));
+ return orb.create_alias_tc(id(), "ObjectId", orb.create_string_tc(0));
}
/**
@@ -97,7 +97,7 @@ public class ObjectIdHelper
/**
* Calls {@link InputStream#read_string()}.
*
- * @param instream the stream to read from.
+ * @param input the stream to read from.
*/
public static String read(InputStream input)
{
@@ -107,7 +107,7 @@ public class ObjectIdHelper
/**
* Calls {@link OutputStream#write_string()}.
*
- * @param ostream the stream to write into.
+ * @param output the stream to write into.
* @param value the string (Object Id) value to write.
*/
public static void write(OutputStream output, String value)
diff --git a/org/omg/PortableInterceptor/ObjectIdHelper.java b/org/omg/PortableInterceptor/ObjectIdHelper.java
new file mode 100644
index 000000000..fb0ab182f
--- /dev/null
+++ b/org/omg/PortableInterceptor/ObjectIdHelper.java
@@ -0,0 +1,119 @@
+/* ObjectIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The Object Id is defined in OMG specification just as a narrow (not wide)
+ * string. As such, the Object Id needs no helper, but one is included in
+ * the API anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectIdHelper
+{
+ /**
+ * Insert the Object Id into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the Object Id from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an alias typecode.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "ObjectId", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the Object Id repository id.
+ * @return "IDL:omg.org/PortableInterceptor/ObjectId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ObjectId:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param input the stream to read from.
+ */
+ public static String read(InputStream input)
+ {
+ return input.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param output the stream to write into.
+ * @param value the string (Object Id) value to write.
+ */
+ public static void write(OutputStream output, String value)
+ {
+ output.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/ServerIdHelper.java b/org/omg/PortableInterceptor/ServerIdHelper.java
new file mode 100644
index 000000000..55f9aff9c
--- /dev/null
+++ b/org/omg/PortableInterceptor/ServerIdHelper.java
@@ -0,0 +1,119 @@
+/* ServerIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The Server Id is defined in OMG specification just as a narrow (not wide)
+ * string. As such, the Server Id needs no helper, but one is included in
+ * the API anyway.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServerIdHelper
+{
+ /**
+ * Insert the Server Id into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the Server Id from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an alias typecode.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "ServerId", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the Server Id repository id.
+ * @return "IDL:omg.org/PortableInterceptor/ServerId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ServerId:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param input the stream to read from.
+ */
+ public static String read(InputStream input)
+ {
+ return input.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param output the stream to write into.
+ * @param value the string (Server Id) value to write.
+ */
+ public static void write(OutputStream output, String value)
+ {
+ output.write_string(value);
+ }
+} \ No newline at end of file