Modifier and Type | Field and Description |
---|---|
protected ChunkFactory |
chunk_factory |
protected TcpIpConnectionMgr |
connection_mgr
connection manager
|
protected org.objectweb.jonathan.apis.kernel.ContextFactory |
context_factory |
protected MarshallerFactory |
marshaller_factory |
protected Scheduler |
scheduler |
boolean |
verbose
Indicates whether warning messages should be printed to stderr.
|
Constructor and Description |
---|
TcpIpProtocol(TcpIpConnectionMgr connection_mgr,
Scheduler scheduler,
ChunkFactory chunk_factory,
MarshallerFactory mf,
org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
Constructs a new instance of TcpIpProtocol.
|
Modifier and Type | Method and Description |
---|---|
ProtocolGraph |
createProtocolGraph(ProtocolGraph[] lower,
org.objectweb.jonathan.apis.kernel.Context hints)
Creates a new ProtocolGraph
|
SessionIdentifier |
createSessionIdentifier(Properties info,
SessionIdentifier[] next)
Creates a new session identifier with the provided info
|
boolean |
isAnInvocationProtocol()
Returns false: TcpIpProtocol cannot deal with invocations.
|
boolean |
isLocal(IpSessionIdentifier tcp_session_id)
Returns true if the provided session identifier corresponds to a local
connection managed by this protocol.
|
IpSessionIdentifier |
newSessionIdentifier(String host,
int port)
Creates a new TcpIpSessionIdentifier.
|
void |
setVerbose(boolean verbose)
Used to set the verbiage level.
|
protected Scheduler scheduler
protected ChunkFactory chunk_factory
protected MarshallerFactory marshaller_factory
protected org.objectweb.jonathan.apis.kernel.ContextFactory context_factory
public boolean verbose
/jonathan/tcpip/verbose
in the bootstrap context
.protected TcpIpConnectionMgr connection_mgr
public TcpIpProtocol(TcpIpConnectionMgr connection_mgr, Scheduler scheduler, ChunkFactory chunk_factory, MarshallerFactory mf, org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
connection_mgr
- a connection manager for this protocol;scheduler
- the kernel's scheduler;chunk_factory
- a chunk factory;mf
- a marshaller factory;context_factory
- a context factoryorg.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public void setVerbose(boolean verbose)
verbose
- if true, turn on verbositypublic boolean isAnInvocationProtocol()
isAnInvocationProtocol
in interface Protocol
public ProtocolGraph createProtocolGraph(ProtocolGraph[] lower, org.objectweb.jonathan.apis.kernel.Context hints)
createProtocolGraph
in interface Protocol
lower
- lower-level protocol graphs. Ignored as TCP/IP is a leaf.hints
- may contain a "port" key/value pair.public IpSessionIdentifier newSessionIdentifier(String host, int port)
host
- a port number;port
- an host name;public SessionIdentifier createSessionIdentifier(Properties info, SessionIdentifier[] next) throws org.objectweb.jonathan.apis.kernel.JonathanException
Protocol
createSessionIdentifier
in interface Protocol
org.objectweb.jonathan.apis.kernel.JonathanException
public boolean isLocal(IpSessionIdentifier tcp_session_id)
tcp_session_id
- a TcpIpSessionIdentifier.