org.objectweb.jeremie.protocols.giop

Class GIOPProtocol

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.

Constructor Summary

GIOPProtocol(Scheduler scheduler, MarshallerFactory marshaller_factory, ChunkFactory chunk_factory, ServicesHandler services_handler, ClassPathFinder finder, boolean verbose, ContextFactory context_factory)
Creates a new GIOP Protocol instance.

Method Summary

ProtocolGraph
createProtocolGraph(ProtocolGraph[] subgraphs, Context hints)
Creates a GIOP Protocol graph.
SessionIdentifier
createSessionIdentifier(Properties info, SessionIdentifier[] next)
Creates a GIOP Session Identifier
boolean
isAnInvocationProtocol()
Returns true: GIOP handles invocations.

Field Details

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 /jeremie/giop/verbose in the bootstrap context.

Constructor Details

GIOPProtocol

public GIOPProtocol(Scheduler scheduler,
                    MarshallerFactory marshaller_factory,
                    ChunkFactory chunk_factory,
                    ServicesHandler services_handler,
                    ClassPathFinder finder,
                    boolean verbose,
                    ContextFactory context_factory)
            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:
scheduler - the scheduler corresponding to the kernel;
marshaller_factory - a marshaller factory;
chunk_factory - a chunk factory;
services_handler - a services handler (may be null);
finder - a classpath finder (class loader)
verbose - should we display messages on the log?
context_factory - a context factory

Method Details

createProtocolGraph

public ProtocolGraph createProtocolGraph(ProtocolGraph[] subgraphs,
                                         Context hints)
            throws JonathanException
Creates a GIOP Protocol graph.

Parameters:
subgraphs - lower level protocol graphs. There should be exactly one!
hints - should have a key named "adapter" with an object adapter as value.

Returns:
a GIOP Protocol Graph


createSessionIdentifier

public SessionIdentifier createSessionIdentifier(Properties info,
                                                 SessionIdentifier[] next)
            throws JonathanException
Creates a GIOP Session Identifier

Parameters:
info - ignored
next - the lower level session ids. There should be exactly one.

Returns:
a new GIOP session identifier


isAnInvocationProtocol

public boolean isAnInvocationProtocol()
Returns true: GIOP handles invocations.

Returns:
true.