org.objectweb.jeremie.binding.iiop
Class IIOPBinder
- NamingContext, EXOTIC_PROTOCOL_SUPPORT, JAVA_SERIAL_SERVICE
IIOPBinder implements the IIOP protocol (GIOP/TCP/IP). This class
should not be used directly by applications, but rather by personnality
binders that will instantiate all the parameters: it is an IIOP "delegate"
implementation.
IIOPBinder(ProtocolInfo protocol_info, Scheduler scheduler, boolean direct_local_optimization, ChunkFactory chunk_factory, MarshallerFactory marshaller_factory, StubFactory stub_factory, NamingContext context, TaggedComponents ior_components, Context protocolMappings, ContextFactory context_factory, TcpIpProtocol tcp_protocol, GIOPProtocol giop_protocol) - Builds a new instance of IIOPBinder.
|
Identifier | decode(UnMarshaller u) - Decodes an identifier from the provided unmarhaller.
|
Identifier | decode(byte[] data, int offset, int length) - Decodes an identifier from a buffer portion.
|
Identifier | export(Object id, Context hints) - Creates a new identifier for the object interface designated by the
id parameter.
|
Identifier | newId(String host, int port, byte[] key) - Creates an IIOP Identifier.
|
void | setVerbose(boolean verbose) - Should we print informational messages on the log?
|
IIOPBinder
public IIOPBinder(ProtocolInfo protocol_info,
Scheduler scheduler,
boolean direct_local_optimization,
ChunkFactory chunk_factory,
MarshallerFactory marshaller_factory,
StubFactory stub_factory,
NamingContext context,
TaggedComponents ior_components,
Context protocolMappings,
ContextFactory context_factory,
TcpIpProtocol tcp_protocol,
GIOPProtocol giop_protocol)
throws JonathanException
Builds a new instance of IIOPBinder.
If
direct_local_optimization
is true, it means that
the actual server implementation should be returned when a local server reference
is unmarshalled. Otherwise, a stub is returned, that will intercept calls to the server.
The
context
parameter represents the actual IIOP naming context,
i.e., the context that delegates its operations to the newly created
IIOPBinder.
protocol_info
- the static information for building protocol graphsscheduler
- a schedulerdirect_local_optimization
- shall we use local optimizations?chunk_factory
- a chunk factory;marshaller_factory
- a marshaller factory;stub_factory
- a stub factory;context
- the actual IIOP binder (the ORB);ior_components
- the components to be included in the created IORsprotocolMappings
- maps the numeric protocol ids null
to instancescontext_factory
- a context factorytcp_protocol
- the TCP/IP protocol instance to be used on fallback to regular IIOPgiop_protocol
- the GIOP protocol instance to be used on fallback to regular IIOP
decode
public Identifier decode(UnMarshaller u)
throws JonathanException
Decodes an identifier from the provided unmarhaller.
u
- an unmarhaller;
- an identifier managed by the target naming context;
decode
public Identifier decode(byte[] data,
int offset,
int length)
throws JonathanException
Decodes an identifier from a buffer portion.
data
- the byte array to read the encoded identifier from;offset
- offset of the first byte of the encoding;length
- length of the encoding;
- a decoded identifier;
export
public Identifier export(Object id,
Context hints)
throws JonathanException
Creates a new identifier for the object interface designated by the
id parameter.
The
hints
member may contain a component named
port
of type int. If so, its value is used as a preferred port
number.
id
must be of type
Identifier
.
id
- an identifier managed by another naming context;hints
- additional information;
- an identifier managed by the target naming context.
org.objectweb.jonathan.model.naming_context.export(
org.objectweb.jonathan.model.name)
newId
public Identifier newId(String host,
int port,
byte[] key)
throws JonathanException
Creates an IIOP Identifier.
host
- a machine host name;port
- a port number;key
- an object key;
- a bindable IIOP Identifier
setVerbose
public void setVerbose(boolean verbose)
Should we print informational messages on the log?
verbose
- if true, the Binder displays messages on the log.