org.objectweb.david.libs.protocols.giop
Class GIOPProtocol
java.lang.Object
|
+--org.objectweb.david.libs.protocols.giop.GIOPProtocol
- All Implemented Interfaces:
- Protocol
- public final class GIOPProtocol
- extends Object
- implements Protocol
GIOPProtocol is an implementation of the GIOP protocol.
|
Field Summary |
static String |
corba_prefix
Constant used for IDL repository ids. |
boolean |
verbose
Indicates whether warning messages should be printed to stderr.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
corba_prefix
public static final String corba_prefix
- Constant used for IDL repository ids.
verbose
public boolean verbose
- Indicates whether warning messages should be printed to stderr.
This constant is defined under the name
/david/giop/verbose
in the bootstrap context.
GIOPProtocol
public GIOPProtocol(Context _c,
Scheduler scheduler,
MarshallerFactory marshaller_factory,
ChunkFactory chunk_factory,
NamingContext adapter,
ServicesHandler services_handler)
throws JonathanException
- Creates a new GIOP Protocol instance.
The adapter parameter represents a naming context that will
be used to forward requests to their recipient: when GIOP decodes requests,
the recipient is encoded as an array of bytes (the object key), that must be
the encoding of an identifier for adapter. GIOP will thus ask
adapter to decode this identifier. The
isValid and
resolve
operations on the
returned identifier may be used respectively to test the existence of the
target object, and its presence locally. If the
resolve
doesn't return
null, it should return a CORBA object reference, that may be returned in
a forward reply (or in case a locate request has been issued). Else, the
identifier is
bound.
The returned object must be of type
RequestSession.
The services_handler parameter will be
called each time a message is sent or received, so that the appropriate
services are provided.
- Parameters:
kernel - a kernel instance;scheduler - the scheduler corresponding to the kernel;marshaller_factory - a marshaller factory;chunk_factory - a chunk factory;adapter - an object adapter;services_handler - a services handler (may be null);- Throws:
JonathanException - if something goes wrong.
isAnInvocationProtocol
public boolean isAnInvocationProtocol()
- Returns true: GIOP handles invocations.
- Specified by:
isAnInvocationProtocol in interface Protocol
- Returns:
- true.
newProtocolGraph
public ProtocolGraph newProtocolGraph(ProtocolGraph next)
- Creates a GIOP protocol graph, with the provided
protocol graph as a lower protocol graph.
- Parameters:
next - a lower protocol graph.- Returns:
- a GIOP-rooted protocol graph.
newSessionIdentifier
public GIOPSessionIdentifier newSessionIdentifier(byte[] object_key,
SessionIdentifier next)
- Creates a GIOP session identifier.
- Parameters:
object_key - the target object key;next - the lower protocol session identifier;- Returns:
- a GIOP session identifier.