|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.omg.CORBA.Any
Any
object is used as a component of a
NamedValue
object, which provides information about
arguments or return values in requests, and which is used to define
name/value pairs in Context
objects.
An Any
object consists of two parts:
TypeCode
object describing the type of the data
value contained in the Any
object. For example,
a TypeCode
object for an array contains
a field for the length of the array and a field for
the type of elements in the array. (Note that in this case, the
second field of the TypeCode
object is itself a
TypeCode
object.)
Method Summary | |
abstract InputStream | create_input_stream()
Creates an input stream from which this Any object's value
can be unmarshalled. |
abstract OutputStream | create_output_stream()
Creates an output stream into which this Any object's
value can be marshalled. |
abstract boolean | equal(Any a)
Checks for equality between this Any object and the
given Any object. |
abstract Any | extract_any()
|
abstract boolean | extract_boolean()
|
abstract char | extract_char()
|
abstract double | extract_double()
|
Number | extract_fixednum()
|
abstract float | extract_float()
|
abstract int | extract_long()
|
abstract long | extract_longlong()
|
abstract Object | extract_Object()
|
abstract byte | extract_octet()
|
abstract Principal | extract_Principal()
|
abstract short | extract_short()
|
abstract String | extract_string()
|
abstract TypeCode | extract_TypeCode()
|
abstract int | extract_ulong()
|
abstract long | extract_ulonglong()
|
abstract short | extract_ushort()
|
Serializable | extract_Value()
|
abstract char | extract_wchar()
|
abstract String | extract_wstring()
|
abstract void | insert_any(Any a)
|
abstract void | insert_boolean(boolean b)
|
abstract void | insert_char(char c)
|
abstract void | insert_double(double d)
|
void | insert_fixednum(Number n)
|
abstract void | insert_float(float f)
|
abstract void | insert_long(int l)
|
abstract void | insert_longlong(long l)
|
abstract void | insert_Object(Object o,
TypeCode t)
|
abstract void | insert_Object(Object o)
|
abstract void | insert_octet(byte b)
|
abstract void | insert_Principal(Principal p)
|
abstract void | insert_short(short s)
|
abstract void | insert_Streamable(Streamable s)
Inserts the given Streamable object
into this Any object's value field.
|
abstract void | insert_string(String s)
|
abstract void | insert_TypeCode(TypeCode t)
|
abstract void | insert_ulong(int l)
|
abstract void | insert_ulonglong(long l)
|
abstract void | insert_ushort(short s)
|
void | insert_Value(Serializable v,
TypeCode t)
|
void | insert_Value(Serializable v)
|
abstract void | insert_wchar(char c)
|
abstract void | insert_wstring(String s)
|
abstract void | read_value(InputStream is,
TypeCode t)
Reads off (unmarshals) the value of an Any object from
the given input stream using the given typecode. |
abstract TypeCode | type()
Returns type information for the element contained in this Any object. |
abstract void | type(TypeCode t)
Sets this Any object's type field
to the given TypeCode object and clears its value.
|
abstract void | write_value(OutputStream os)
Writes out to the given output stream the typecode and value of this Any object.
|
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Method Detail |
public abstract TypeCode type()
Any
object.TypeCode
object containing type information
about the object contained in this Any
.public abstract void type(TypeCode t)
Any
object's type
field
to the given TypeCode
object and clears its value.
Note that using this method to set the type code wipes out the
value if there is one. The method
is provided primarily so that the type may be set properly for
IDL out
parameters. Generally, setting the type
is done by the insert_X
methods, which will set the type
to X if it is not already set to X.
t
- the TypeCode
object giving
information for the object in
this Any
objectpublic abstract boolean equal(Any a)
Any
object and the
given Any
object. Two Any
objects are
equal if both their values and type codes are equal.
a
- the Any
object to test for equalitytrue
if the Any
objects are equal;
false
otherwisepublic abstract void read_value(InputStream is, TypeCode t) throws MARSHAL
Any
object from
the given input stream using the given typecode.
is
- the org.omg.CORBA.portable.InputStream
object from which to read
the value contained in this Any
object
t
- a TypeCode
object containing type information
about the value to be readTypeCode
object is
not consistent with the value that was contained
in the input streampublic abstract void write_value(OutputStream os) throws MARSHAL
Any
object.
If this method is called on an Any
object that has not
had a value inserted into its value
field, it will throw
the exception java.lang.NullPointerException
.
os
- the org.omg.CORBA.portable.OutputStream
object into which to marshal the value and typecode
of this Any
objectAny
object
is inconsistent with its valuepublic abstract OutputStream create_output_stream()
Any
object's
value can be marshalled.OutputStream
public abstract InputStream create_input_stream()
Any
object's value
can be unmarshalled.InputStream
public abstract void insert_Streamable(Streamable s)
Streamable
object
into this Any
object's value
field.
This method allows the insertion of non-primitive IDL types.
s
- the Streamable
object to insert into this
Any
objectpublic abstract short extract_short() throws BAD_OPERATION
public abstract void insert_short(short s)
public abstract int extract_long() throws BAD_OPERATION
public abstract void insert_long(int l)
public abstract long extract_longlong() throws BAD_OPERATION
public abstract void insert_longlong(long l) throws BAD_OPERATION
public abstract short extract_ushort() throws BAD_OPERATION
public abstract void insert_ushort(short s)
public abstract int extract_ulong() throws BAD_OPERATION
public abstract void insert_ulong(int l)
public abstract long extract_ulonglong() throws BAD_OPERATION
public abstract void insert_ulonglong(long l)
public abstract float extract_float() throws BAD_OPERATION
public abstract void insert_float(float f)
public abstract double extract_double() throws BAD_OPERATION
public abstract void insert_double(double d)
public abstract boolean extract_boolean() throws BAD_OPERATION
public abstract void insert_boolean(boolean b)
public abstract char extract_char() throws BAD_OPERATION
public abstract void insert_char(char c)
public abstract byte extract_octet() throws BAD_OPERATION
public abstract void insert_octet(byte b)
public abstract char extract_wchar() throws BAD_OPERATION
public abstract void insert_wchar(char c)
public abstract Any extract_any() throws BAD_OPERATION
public abstract void insert_any(Any a)
public abstract String extract_string() throws BAD_OPERATION
public abstract void insert_string(String s)
public abstract String extract_wstring() throws BAD_OPERATION
public abstract void insert_wstring(String s)
public abstract Object extract_Object() throws BAD_OPERATION
public abstract void insert_Object(Object o)
public abstract void insert_Object(Object o, TypeCode t)
public abstract TypeCode extract_TypeCode() throws BAD_OPERATION
public abstract void insert_TypeCode(TypeCode t)
public abstract Principal extract_Principal() throws BAD_OPERATION
public abstract void insert_Principal(Principal p)
public Number extract_fixednum()
public void insert_fixednum(Number n)
public Serializable extract_Value() throws BAD_OPERATION
public void insert_Value(Serializable v)
public void insert_Value(Serializable v, TypeCode t) throws MARSHAL
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |