CS 696 Emerging Technologies: Distributed Objects |
---|
interface In_Out_Examples { void just_out( out short a); void in_out( inout string b); void just_in( in char c); };
public interface In_Out_Examples extends org.omg.CORBA.Object { public void just_out(org.omg.CORBA.ShortHolder a) ; public void in_out(org.omg.CORBA.StringHolder b) ; public void just_in(char c) ; public java.lang.Object _deref() ; }
package org.omg.CORBA final public class ShortHolder { public short value; public ShortHolder() {} public ShortHolder(short initial) { value = initial; } }
class SampleUse { public void aMethod() { In_Out_Examples sample = get_A_real_object(); ShortHolder out = new ShortHolder(); sample.just_out( out); short theRealValue = out.value; } }
class In_Out_Examples extends _In_Out_ExamplesImplBase { public void just_out(org.omg.CORBA.ShortHolder a) { a.value = (short) 3; } etc. }
final public class <Type>Holder { public <type> value; public <Type>Holder() {} public <Type>Holder(<type> intial) { value = initial; } }
// Generated by IDL compiler import IE.Iona.OrbixWeb._OrbixWeb; public final class In_Out_ExamplesHolder implements org.omg.CORBA.portable.Streamable { public In_Out_Examples value; public In_Out_ExamplesHolder() {} public In_Out_ExamplesHolder(In_Out_Examples value) { this.value = value; } public void _read (org.omg.CORBA.portable.InputStream _stream) { value = In_Out_ExamplesHelper.read(_stream); } public void _write (org.omg.CORBA.portable.OutputStream _stream) { In_Out_ExamplesHelper.write(_stream, value); } public org.omg.CORBA.TypeCode _type () { return In_Out_ExamplesHelper.type(); } }
interface No_Blocking_Here { oneway void no_reply( in string message); };
// Java generated by the OrbixWeb IDL compiler public interface No_Blocking_Here extends org.omg.CORBA.Object { public void no_reply(String message) ; public java.lang.Object _deref() ; }
interface Account { readonly attribute float balance; attribute string name; };
// Java generated by the OrbixWeb IDL compiler public interface Account extends org.omg.CORBA.Object { public float balance(); public String name(); public void name(String value); public java.lang.Object _deref() ; }
module University { exception party_time { string event; }; exception break { short term; short year; }; interface partyAnimal { void study( in string man) raises (party_time, break); }; };
// Java generated by the OrbixWeb IDL compiler package University; public interface partyAnimal extends org.omg.CORBA.Object { public void study(String man) throws University.party_time, University._break; public java.lang.Object _deref() ; }
// Java generated by the OrbixWeb IDL compiler package University; public final class party_time extends org.omg.CORBA.UserException implements java.lang.Cloneable { public String event; public party_time() { super(); } public party_time(String event) { super(); this.event = event; } public java.lang.Object clone() { code removed } }
package org.omg.CORBA; abstract public class SystemException extends java.lang.RunTimeException { public int minor; public CompletionStatus completed; protected SystemException( String reason, int minor, CompletionStatus status) { super( reason ); this.minor = minor; this.status = status; } }CompletionStatus is defined by the IDL:
enum CompletionStatus { COMPLETED_YES, COMPLETED_NO, COMPLETED_MAYBE};
module ConstructedTypes { struct Time { short hour; short minute; short second; }; typedef Time CORBA_Time; enum Grades {A, B, Forget_it}; };
module ConstructedTypes { struct Time { short hour; short minute; short second; }; typedef Time CORBA_Time; };
// Java generated by the OrbixWeb IDL compiler package ConstructedTypes; public final class Time implements java.lang.Cloneable { public short hour; public short minute; public short second; public Time () {} public Time (short hour,short minute,short second) { this.hour = hour; this.minute = minute; this.second = second; } public java.lang.Object clone() { code removed } }
module ConstructedTypes { struct Time { short hour; short minute; short second; }; typedef Time CORBA_Time; interface test { CORBA_Time when(); }; };
module ConstructedTypes { enum Grades {A, B, Forget_it}; };
// Java generated by the OrbixWeb IDL compiler package ConstructedTypes; public final class Grades implements java.lang.Cloneable { public static final int _A = 0; public static final Grades A = new Grades(_A); public static final int _B = 1; public static final Grades B = new Grades(_B); public static final int _Forget_it = 2; public static final Grades Forget_it = new Grades(_Forget_it); public static final Grades IT_ENUM_MAX = new Grades(Integer.MAX_VALUE); public int value () { return ___value; } public static Grades from_int (int value) { switch (value) { case _A : return A; case _B : return B; case _Forget_it : return Forget_it; default : throw new org.omg.CORBA.BAD_PARAM("Enum out of range"); } } private Grades (int value) { ___value = value; } private int ___value; public java.lang.Object clone(){ return from_int(___value); } }
interface Bank { // unbonded string readonly attribute string address; // bounded size string readonly attribute string first_name<10>; // string using wchars readonly attribute wstring last_name<5>; };
interface Account { readonly attribute string name; }; struct Accounts { // bounded sequence<Account, 10> acountList; // unbounded sequence<short> ID; }; typedef sequence<long> accountNmbers; interface Bank { void accountList( out accountNmbers list); };
// Java generated by the OrbixWeb IDL compiler // import Account; import AccountHelper; import AccountHolder; import _AccountOperations; import _AccountStub; public final class Accounts implements java.lang.Cloneable { public Account[] acountList; public short[] ID; public Accounts () {} public Accounts (Account[] acountList,short[] ID) { this.acountList = acountList; this.ID = ID; } public java.lang.Object clone() { code removed } }
typedef short BankCode[4]; typedef long multi[2, 4]; interface Sample { readonly attribute BankCode code; };
// Java generated by the OrbixWeb IDL compiler import BankCodeHelper; import BankCodeHolder; public interface Sample extends org.omg.CORBA.Object { public short[] code(); public java.lang.Object _deref() ; }
// Java generated by the OrbixWeb IDL compiler import IE.Iona.OrbixWeb._OrbixWeb; public final class BankCodeHolder implements org.omg.CORBA.portable.Streamable { public short[] value; public BankCodeHolder() {} public BankCodeHolder(short[] value) { this.value = value; } public void _read ( blah) { code removed } public void _write (blah) { code removed } public org.omg.CORBA.TypeCode _type () { code removed } }