org.omg.IOP

Class ServiceContextHelper

public abstract class ServiceContextHelper extends Object

A helper operations for the structure {@link ServiceContext}.
Method Summary
static ServiceContextextract(Any any)
Extract the ServiceContext from given Any.
static Stringid()
Get the ServiceContext repository id.
static voidinsert(Any any, ServiceContext that)
Insert the ServiceContext into the given Any.
static ServiceContextread(InputStream input)
Read the context from the CDR intput stream (first id, then data as a flexible length byte sequence).
static TypeCodetype()
Create the ServiceContext typecode (structure, named "ServiceContext").
static voidwrite(OutputStream output, ServiceContext value)
Write the context to the CDR output stream (first id, then data as a flexible length byte sequence).

Method Detail

extract

public static ServiceContext extract(Any any)
Extract the ServiceContext from given Any. This method uses the ServiceContextHolder.

Throws: BAD_OPERATION if the passed Any does not contain ServiceContext.

id

public static String id()
Get the ServiceContext repository id.

Returns: "IDL:omg.org/IOP/ServiceContext:1.0", always.

insert

public static void insert(Any any, ServiceContext that)
Insert the ServiceContext into the given Any. This method uses the ServiceContextHolder.

Parameters: any the Any to insert into. that the ServiceContext to insert.

read

public static ServiceContext read(InputStream input)
Read the context from the CDR intput stream (first id, then data as a flexible length byte sequence).

Parameters: input a org.omg.CORBA.portable stream to read from.

type

public static TypeCode type()
Create the ServiceContext typecode (structure, named "ServiceContext"). The typecode states that the structure contains the following fields: context_id, context_data.

write

public static void write(OutputStream output, ServiceContext value)
Write the context to the CDR output stream (first id, then data as a flexible length byte sequence).

Parameters: output a org.omg.CORBA.portable stream stream to write into. value a value to write.