Novell exteNd Messaging Platform 5.2

com.sssw.jbroker.api.context
Interface ContextCurrent

All Superinterfaces:
Object

public interface ContextCurrent
extends Object

Support for getting/setting invocation context. The context is passed transparantly from client to server and back for each invocation. If the server modifies the context, the client will be able to get the new value when the invocation completes.

Since:
jBroker ORB 4.0

Method Summary
 byte[] getContext()
          Get the context for this thread.
 void setContext(byte[] context)
          Set the context for this thread.
 void setORBContext(byte[] context)
          Set the context at the ORB Level.
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Method Detail

setORBContext

public void setORBContext(byte[] context)
Set the context at the ORB Level. This will be the context for all threads using the ORB that do not have a thread level context set.

This API is for the end clients that may want to start off multiple threads under the same context.

Parameters:
context - a byte array with context data

setContext

public void setContext(byte[] context)
Set the context for this thread. To unset the context, set the context to null.

Parameters:
context - a byte array with context data

getContext

public byte[] getContext()
Get the context for this thread. If there is no thread level context, then ORB level context is returned.

Returns:
the context data if any has been set

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.