gnu.CORBA.GIOP

Class ServiceContext

Implemented Interfaces:
IDLEntity, Serializable
Known Direct Subclasses:
CodeSetServiceContext

public class ServiceContext
extends Object
implements IDLEntity

Contains the ORB service data being passed.

Field Summary

static int
ActivityService
static int
BI_DIR_IIOP
static int
ChainBypassCheck
static int
ChainBypassInfo
static int
CodeSets
Defines code sets, used to encode wide and narrow characters.
static int
ExceptionDetailMessage
static int
FORWARDED_IDENTITY
static int
FT_GROUP_VERSION
static int
FT_REQUEST
static int
INVOCATION_POLICIES
static int
LogicalThreadId
static int
RTCorbaPriority
static int
RTCorbaPriorityRange
static int
SecurityAttributeService
static int
SendingContextRunTime
static int
TransactionService
static int
UnknownExceptionInfo
Contains exception details if exception being transferred is other than System or User exception. javax.rmi uses this context to transfer arbitrary java exceptions as CORBA value types.
byte[]
context_data
The context_data.
int
context_id
The context id (for instance, 0x1 for code sets context).

Constructor Summary

ServiceContext()
Crete unitialised instance.
ServiceContext(ServiceContext from)
Create from omg context.

Method Summary

static ServiceContext[]
add(ServiceContext[] cx, ServiceContext service_context, boolean replace)
Add context to the given array of contexts.
static void
add(ServiceContext[] cx, ServiceContext service_context, boolean replace)
Add context to the given array of contexts.
static ServiceContext
find(int ctx_name, ServiceContext[] cx)
Find context with the given name in the context array without conversions.
static ServiceContext
findContext(int ctx_name, ServiceContext[] cx)
Find context with the given name in the context array, converting into org.omg.IOP.ServiceContext.
static ServiceContext
findContext(int ctx_name, ServiceContext[] cx)
Find context with the given name in the context array.
static ServiceContext
read(AbstractCdrInput istream)
Read the context values from the stream.
static ServiceContext[]
readSequence(AbstractCdrInput istream)
Read a sequence of contexts from the input stream.
String
toString()
Return a string representation.
void
write(AbstractCdrOutput ostream)
Write the context values into the stream.
static void
writeSequence(AbstractCdrOutput ostream, ServiceContext[] value)
Write the sequence of contexts into the input stream.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ActivityService

public static final int ActivityService
Field Value:
16

BI_DIR_IIOP

public static final int BI_DIR_IIOP
Field Value:
5

ChainBypassCheck

public static final int ChainBypassCheck
Field Value:
2

ChainBypassInfo

public static final int ChainBypassInfo
Field Value:
3

CodeSets

public static final int CodeSets
Defines code sets, used to encode wide and narrow characters. Required for messages with data structures, involving wide characters.
Field Value:
1

ExceptionDetailMessage

public static final int ExceptionDetailMessage
Field Value:
14

FORWARDED_IDENTITY

public static final int FORWARDED_IDENTITY
Field Value:
8

FT_GROUP_VERSION

public static final int FT_GROUP_VERSION
Field Value:
12

FT_REQUEST

public static final int FT_REQUEST
Field Value:
13

INVOCATION_POLICIES

public static final int INVOCATION_POLICIES
Field Value:
7

LogicalThreadId

public static final int LogicalThreadId
Field Value:
4

RTCorbaPriority

public static final int RTCorbaPriority
Field Value:
10

RTCorbaPriorityRange

public static final int RTCorbaPriorityRange
Field Value:
11

SecurityAttributeService

public static final int SecurityAttributeService
Field Value:
15

SendingContextRunTime

public static final int SendingContextRunTime
Field Value:
6

TransactionService

public static final int TransactionService
Field Value:
0

UnknownExceptionInfo

public static final int UnknownExceptionInfo
Contains exception details if exception being transferred is other than System or User exception. javax.rmi uses this context to transfer arbitrary java exceptions as CORBA value types.
Field Value:
9

context_data

public byte[] context_data
The context_data.

context_id

public int context_id
The context id (for instance, 0x1 for code sets context). At the moment of writing, the OMG defines 16 standard values and provides rules to register the vendor specific context ids. The range 0-4095 is reserved for the future standard OMG contexts.

Constructor Details

ServiceContext

public ServiceContext()
Crete unitialised instance.

ServiceContext

public ServiceContext(ServiceContext from)
Create from omg context.

Method Details

add

public static ServiceContext[] add(ServiceContext[] cx,
                                   ServiceContext service_context,
                                   boolean replace)
Add context to the given array of contexts.

add

public static void add(ServiceContext[] cx,
                       ServiceContext service_context,
                       boolean replace)
Add context to the given array of contexts.

find

public static ServiceContext find(int ctx_name,
                                  ServiceContext[] cx)
Find context with the given name in the context array without conversions.

findContext

public static ServiceContext findContext(int ctx_name,
                                         ServiceContext[] cx)
Find context with the given name in the context array, converting into org.omg.IOP.ServiceContext.

findContext

public static ServiceContext findContext(int ctx_name,
                                         ServiceContext[] cx)
Find context with the given name in the context array.

read

public static ServiceContext read(AbstractCdrInput istream)
Read the context values from the stream.
Parameters:
istream - a stream to read from.

readSequence

public static ServiceContext[] readSequence(AbstractCdrInput istream)
Read a sequence of contexts from the input stream.

toString

public String toString()
Return a string representation.
Overrides:
toString in interface Object

write

public void write(AbstractCdrOutput ostream)
Write the context values into the stream.
Parameters:
ostream - a stream to write the data to.

writeSequence

public static void writeSequence(AbstractCdrOutput ostream,
                                 ServiceContext[] value)
Write the sequence of contexts into the input stream.

ServiceContext.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.