001 package tecgraf.openbus.DRMAA;
002
003
004 /**
005 * Generated from IDL interface "Session".
006 *
007 * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
008 * @version generated at Jul 20, 2010 6:14:58 PM
009 */
010
011 public final class SessionHelper
012 {
013 public static void insert (final org.omg.CORBA.Any any, final tecgraf.openbus.DRMAA.Session s)
014 {
015 any.insert_Object(s);
016 }
017 public static tecgraf.openbus.DRMAA.Session extract(final org.omg.CORBA.Any any)
018 {
019 return narrow(any.extract_Object()) ;
020 }
021 public static org.omg.CORBA.TypeCode type()
022 {
023 return org.omg.CORBA.ORB.init().create_interface_tc("IDL:tecgraf/openbus/DRMAA/Session:1.0", "Session");
024 }
025 public static String id()
026 {
027 return "IDL:tecgraf/openbus/DRMAA/Session:1.0";
028 }
029 public static Session read(final org.omg.CORBA.portable.InputStream in)
030 {
031 return narrow(in.read_Object(tecgraf.openbus.DRMAA._SessionStub.class));
032 }
033 public static void write(final org.omg.CORBA.portable.OutputStream _out, final tecgraf.openbus.DRMAA.Session s)
034 {
035 _out.write_Object(s);
036 }
037 public static tecgraf.openbus.DRMAA.Session narrow(final org.omg.CORBA.Object obj)
038 {
039 if (obj == null)
040 {
041 return null;
042 }
043 else if (obj instanceof tecgraf.openbus.DRMAA.Session)
044 {
045 return (tecgraf.openbus.DRMAA.Session)obj;
046 }
047 else if (obj._is_a("IDL:tecgraf/openbus/DRMAA/Session:1.0"))
048 {
049 tecgraf.openbus.DRMAA._SessionStub stub;
050 stub = new tecgraf.openbus.DRMAA._SessionStub();
051 stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
052 return stub;
053 }
054 else
055 {
056 throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
057 }
058 }
059 public static tecgraf.openbus.DRMAA.Session unchecked_narrow(final org.omg.CORBA.Object obj)
060 {
061 if (obj == null)
062 {
063 return null;
064 }
065 else if (obj instanceof tecgraf.openbus.DRMAA.Session)
066 {
067 return (tecgraf.openbus.DRMAA.Session)obj;
068 }
069 else
070 {
071 tecgraf.openbus.DRMAA._SessionStub stub;
072 stub = new tecgraf.openbus.DRMAA._SessionStub();
073 stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
074 return stub;
075 }
076 }
077 }