org.omg.CORBA

Class Any

public abstract class Any extends Object implements Serializable, IDLEntity

A container that can store a value of either user defined or primitive IDL type.
Method Summary
abstract InputStreamcreate_input_stream()
Creates an input stream from that this Any object's value can be read (unmarshalled).
abstract OutputStreamcreate_output_stream()
Creates an output stream into which this Any object's value can be written (marshalled).
abstract booleanequal(Any other)
Compare this Any with another Any.
abstract Anyextract_any()
Extract another Any from this Any.
abstract booleanextract_boolean()
Extract the CORBA boolean from this Any.
abstract charextract_char()
Extract the CORBA char from this Any.
abstract doubleextract_double()
Extract the CORBA double from this Any.
BigDecimalextract_fixed()
Extract the CORBA fixed from this Any.
abstract floatextract_float()
Extract the CORBA float from this Any.
abstract intextract_long()
Extract the CORBA long from this Any.
abstract longextract_longlong()
Extract the CORBA long long from this Any.
abstract byteextract_octet()
Extract the CORBA octet from this Any.
abstract Objectextract_Object()
Extract the CORBA Object from this Any
Principalextract_Principal()
Extract the CORBA Principal from this Any
abstract shortextract_short()
Extract the CORBA short from this Any.
abstract Stringextract_string()
Extract the CORBA string from this Any.
Streamableextract_Streamable()
Extract an arbitrary {@link org.omg.CORBA.portable.Streamable } from this Any.
abstract TypeCodeextract_TypeCode()
Extract the TypeCode from this Any value field.
abstract intextract_ulong()
Extract the CORBA unsigned long from this Any
abstract longextract_ulonglong()
Extract the CORBA unsigned long long from this Any.
abstract shortextract_ushort()
Extract the CORBA unsigned short from this Any
abstract Serializableextract_Value()
Extract the CORBA Value from this Any
abstract charextract_wchar()
Extract the CORBA wchar from this Any
abstract Stringextract_wstring()
Extract the CORBA wstring from this Any
abstract voidinsert_any(Any x)
Insert the CORBA any into this Any
abstract voidinsert_boolean(boolean x)
Insert the CORBA boolean into this Any
abstract voidinsert_char(char x)
Insert the CORBA char into this Any
abstract voidinsert_double(double x)
Insert the CORBA double into this Any
voidinsert_fixed(BigDecimal x, TypeCode typecode)
Insert the CORBA fixed into this Any
voidinsert_fixed(BigDecimal x)
Insert the CORBA fixed into this Any
abstract voidinsert_float(float x)
Insert the CORBA float into this Any
abstract voidinsert_long(int x)
Insert the CORBA long into this Any
abstract voidinsert_longlong(long x)
Insert the CORBA longlong into this Any
abstract voidinsert_octet(byte x)
Insert the CORBA octet into this Any
abstract voidinsert_Object(Object x, TypeCode typecode)
Insert the CORBA Object into this Any
abstract voidinsert_Object(Object x)
Insert the CORBA Object into this Any
voidinsert_Principal(Principal x)
Insert the CORBA Principal into this Any.
abstract voidinsert_short(short x)
Insert the CORBA short into this Any
abstract voidinsert_string(String x)
Insert the CORBA string into this Any
voidinsert_Streamable(Streamable x)
Insert the CORBA Streamable into this Any
abstract voidinsert_TypeCode(TypeCode typecode)
Insert the CORBA TypeCode into this Any value field.
abstract voidinsert_ulong(int x)
Insert the CORBA ulong into this Any
abstract voidinsert_ulonglong(long x)
Insert the CORBA ulonglong into this Any
abstract voidinsert_ushort(short x)
Insert the CORBA ushort into this Any
abstract voidinsert_Value(Serializable x, TypeCode typecode)
Insert the CORBA Value into this Any.
abstract voidinsert_Value(Serializable x)
Insert the CORBA Value into this Any.
abstract voidinsert_wchar(char x)
Insert the CORBA wchar into this Any
abstract voidinsert_wstring(String x)
Insert the CORBA wstring into this Any
abstract voidread_value(InputStream input, TypeCode type)
Read the value into this Any from the given input stream.
abstract voidtype(TypeCode valueTypeCode)
Set the type of the object, stored in this Any, to the given TypeCode.
abstract TypeCodetype()
Returns the TypeCode of the object, stored in this Any
abstract voidwrite_value(OutputStream output)
Writes out the value (without the typecode of the value), stored in this Any.

Method Detail

create_input_stream

public abstract InputStream create_input_stream()
Creates an input stream from that this Any object's value can be read (unmarshalled).

create_output_stream

public abstract OutputStream create_output_stream()
Creates an output stream into which this Any object's value can be written (marshalled).

Returns: the newly created output stream.

equal

public abstract boolean equal(Any other)
Compare this Any with another Any.

Parameters: other the other instance to compare with.

Returns: true if both values and value typecodes are equal, false otherwise.

extract_any

public abstract Any extract_any()
Extract another Any from this Any.

Throws: BAD_OPERATION if this instance contains value other than any or the value has not been set.

extract_boolean

public abstract boolean extract_boolean()
Extract the CORBA boolean from this Any.

Throws: BAD_OPERATION if this instance contains value other than boolean or the value has not been set.

extract_char

public abstract char extract_char()
Extract the CORBA char from this Any.

Throws: BAD_OPERATION if this instance contains value other than char or the value has not been set.

extract_double

public abstract double extract_double()
Extract the CORBA double from this Any.

Throws: BAD_OPERATION if this instance contains value other than double or the value has not been set.

extract_fixed

public BigDecimal extract_fixed()
Extract the CORBA fixed from this Any.

Throws: BAD_OPERATION if this instance contains value other than fixed or the value has not been set. NO_IMPLEMENT, always (override to get functionality).

extract_float

public abstract float extract_float()
Extract the CORBA float from this Any.

Throws: BAD_OPERATION if this instance contains value other than float or the value has not been set.

extract_long

public abstract int extract_long()
Extract the CORBA long from this Any.

Throws: BAD_OPERATION if this instance contains value other than long or the value has not been set.

extract_longlong

public abstract long extract_longlong()
Extract the CORBA long long from this Any.

Throws: BAD_OPERATION if this instance contains value other than longlong or the value has not been set.

extract_octet

public abstract byte extract_octet()
Extract the CORBA octet from this Any.

Throws: BAD_OPERATION if this instance contains value other than octet or the value has not been set.

extract_Object

public abstract Object extract_Object()
Extract the CORBA Object from this Any

Throws: BAD_OPERATION if this instance contains value other than Object or the value has not been set.

extract_Principal

public Principal extract_Principal()

Deprecated: by CORBA 2.2.

Extract the CORBA Principal from this Any

Throws: NO_IMPLEMENT, always.

extract_short

public abstract short extract_short()
Extract the CORBA short from this Any.

Throws: BAD_OPERATION if this instance contains value other than short or the value has not been set.

extract_string

public abstract String extract_string()
Extract the CORBA string from this Any.

Throws: BAD_OPERATION if this instance contains value other than string or the value has not been set.

extract_Streamable

public Streamable extract_Streamable()
Extract an arbitrary {@link org.omg.CORBA.portable.Streamable } from this Any.

Throws: BAD_INV_ORDER if the caller has invoked operations in the wrong order. NO_IMPLEMENT, always (override to get functionality).

extract_TypeCode

public abstract TypeCode extract_TypeCode()
Extract the TypeCode from this Any value field.

Throws: BAD_OPERATION if this instance contains value other than TypeCode or the value has not been set.

extract_ulong

public abstract int extract_ulong()
Extract the CORBA unsigned long from this Any

Throws: BAD_OPERATION if this instance contains value other than unsigned long or the value has not been set.

extract_ulonglong

public abstract long extract_ulonglong()
Extract the CORBA unsigned long long from this Any.

Throws: BAD_OPERATION if this instance contains value other than unsigned long long or the value has not been set.

extract_ushort

public abstract short extract_ushort()
Extract the CORBA unsigned short from this Any

Throws: BAD_OPERATION if this instance contains value other than unsigned short or the value has not been set.

extract_Value

public abstract Serializable extract_Value()
Extract the CORBA Value from this Any

Throws: BAD_OPERATION if this instance contains value other than Value or the value has not been set.

extract_wchar

public abstract char extract_wchar()
Extract the CORBA wchar from this Any

Throws: BAD_OPERATION if this instance contains value other than wchar or the value has not been set.

extract_wstring

public abstract String extract_wstring()
Extract the CORBA wstring from this Any

Throws: BAD_OPERATION if this instance contains value other than wstring or the value has not been set.

insert_any

public abstract void insert_any(Any x)
Insert the CORBA any into this Any

insert_boolean

public abstract void insert_boolean(boolean x)
Insert the CORBA boolean into this Any

insert_char

public abstract void insert_char(char x)
Insert the CORBA char into this Any

insert_double

public abstract void insert_double(double x)
Insert the CORBA double into this Any

insert_fixed

public void insert_fixed(BigDecimal x, TypeCode typecode)
Insert the CORBA fixed into this Any

insert_fixed

public void insert_fixed(BigDecimal x)
Insert the CORBA fixed into this Any

insert_float

public abstract void insert_float(float x)
Insert the CORBA float into this Any

insert_long

public abstract void insert_long(int x)
Insert the CORBA long into this Any

insert_longlong

public abstract void insert_longlong(long x)
Insert the CORBA longlong into this Any

insert_octet

public abstract void insert_octet(byte x)
Insert the CORBA octet into this Any

insert_Object

public abstract void insert_Object(Object x, TypeCode typecode)
Insert the CORBA Object into this Any

insert_Object

public abstract void insert_Object(Object x)
Insert the CORBA Object into this Any

insert_Principal

public void insert_Principal(Principal x)

Deprecated: by CORBA 2.2.

Insert the CORBA Principal into this Any.

insert_short

public abstract void insert_short(short x)
Insert the CORBA short into this Any

insert_string

public abstract void insert_string(String x)
Insert the CORBA string into this Any

insert_Streamable

public void insert_Streamable(Streamable x)
Insert the CORBA Streamable into this Any

insert_TypeCode

public abstract void insert_TypeCode(TypeCode typecode)
Insert the CORBA TypeCode into this Any value field.

insert_ulong

public abstract void insert_ulong(int x)
Insert the CORBA ulong into this Any

insert_ulonglong

public abstract void insert_ulonglong(long x)
Insert the CORBA ulonglong into this Any

insert_ushort

public abstract void insert_ushort(short x)
Insert the CORBA ushort into this Any

insert_Value

public abstract void insert_Value(Serializable x, TypeCode typecode)
Insert the CORBA Value into this Any. The type of the Any should be set (by {@link #type(TypeCode)}) before inserting the value.

insert_Value

public abstract void insert_Value(Serializable x)
Insert the CORBA Value into this Any. The type of the Any should be set (by {@link #type(TypeCode)}) before inserting the value.

insert_wchar

public abstract void insert_wchar(char x)
Insert the CORBA wchar into this Any

insert_wstring

public abstract void insert_wstring(String x)
Insert the CORBA wstring into this Any

read_value

public abstract void read_value(InputStream input, TypeCode type)
Read the value into this Any from the given input stream.

Parameters: input a CORBA stream to read from. type a TypeCode of the object being read.

Throws: org.omg.CORBA.MARSHAL if the given TypeCode does not match the TypeCode of the object, found in the stream.

type

public abstract void type(TypeCode valueTypeCode)
Set the type of the object, stored in this Any, to the given TypeCode. Clear the value.

Parameters: valueTypeCode the type of the object that is expected to be stored in this any.

type

public abstract TypeCode type()
Returns the TypeCode of the object, stored in this Any

Returns: the TypeCode

write_value

public abstract void write_value(OutputStream output)
Writes out the value (without the typecode of the value), stored in this Any.

Parameters: output the CORBA stream to write into.

Throws: NullPointerException if the value of this Any has not been set.