org.objectweb.jonathan.libs.protocols.tcpip
Class TcpIpProtocol
java.lang.Object
|
+--org.objectweb.jonathan.libs.protocols.tcpip.TcpIpProtocol
- All Implemented Interfaces:
- Protocol
- public final class TcpIpProtocol
- extends Object
- implements Protocol
This is an implementation of the
Protocol
interface representing the TCP/IP stack.
|
Field Summary |
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 |
verbose
public boolean verbose
- Indicates whether warning messages should be printed to stderr.
This constant is defined under the name
/jonathan/tcpip/verbose
in the bootstrap context.
TcpIpProtocol
public TcpIpProtocol(Context _c,
TcpIpConnectionMgr connection_mgr,
Scheduler scheduler,
ChunkFactory chunk_factory,
MarshallerFactory mf)
throws JonathanException
- Constructs a new instance of TcpIpProtocol.
- Parameters:
_c - a bootstrap Context instance;connection_mgr - a connection manager for this protocol;scheduler - the kernel's scheduler;chunk_factory - a chunk factory;mf - a marshaller factory;- Throws:
JonathanException - if something goes wrong.
isAnInvocationProtocol
public final boolean isAnInvocationProtocol()
- Returns false: TcpIpProtocol cannot deal with invocations.
- Specified by:
isAnInvocationProtocol in interface Protocol
- Returns:
- false.
newProtocolGraph
public final ProtocolGraph newProtocolGraph()
- Creates a new ProtocolGraph.
- Returns:
- a new ProtocolGraph.
newProtocolGraph
public final ProtocolGraph newProtocolGraph(int port)
- Creates a new ProtocolGraph.
- Parameters:
port - a port number;- Returns:
- a new ProtocolGraph.
newSessionIdentifier
public final IpSessionIdentifier newSessionIdentifier(String host,
int port)
- Creates a new TcpIpSessionIdentifier.
- Parameters:
host - a port number;port - an host name;- Returns:
- a new TcpIpSessionIdentifier.
isLocal
public boolean isLocal(IpSessionIdentifier tcp_session_id)
- Returns true if the provided session identifier corresponds to a local
connection managed by this protocol.
- Parameters:
tcp_session_id - a TcpIpSessionIdentifier.- Returns:
- true if the provided session identifier corresponds to a local
connection managed by this protocol, otherwise false.