Handlerclass SAMv3Handler extends SAMv1Handler
| 修飾子とタイプ | フィールド | 説明 |
|---|---|---|
static SessionsDB |
sSessionsHash |
_log, bridge, i2cpProps, socket, stopHandler, stopLock, thread, verMajor, verMinor_id, datagramSession, rawSession, SESSION_ERROR, streamSession| コンストラクタ | 説明 |
|---|---|
SAMv3Handler(java.nio.channels.SocketChannel s,
int verMajor,
int verMinor,
java.util.Properties i2cpProps,
SAMBridge parent) |
Create a new SAM version 3 handler.
|
SAMv3Handler(java.nio.channels.SocketChannel s,
int verMajor,
int verMinor,
SAMBridge parent) |
Create a new SAM version 3 handler.
|
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
protected boolean |
execSessionMessage(java.lang.String opcode,
java.util.Properties props) |
|
protected boolean |
execStreamConnect(java.util.Properties props) |
|
protected boolean |
execStreamMessage(java.lang.String opcode,
java.util.Properties props) |
|
(package private) SAMBridge |
getBridge() |
For SAMv3StreamSession
|
java.lang.String |
getClientIP() |
|
(package private) Session |
getSession() |
For SAMv3DatagramServer
|
void |
handle() |
Actually handle the SAM protocol.
|
static void |
notifyStreamIncomingConnection(java.nio.channels.SocketChannel client,
Destination d) |
|
static void |
notifyStreamIncomingConnection(java.nio.channels.SocketChannel client,
Destination d,
int fromPort,
int toPort) |
|
void |
notifyStreamIncomingConnection(Destination d,
int fromPort,
int toPort) |
|
void |
notifyStreamResult(boolean verbose,
java.lang.String result,
java.lang.String message) |
|
(package private) void |
setSession(SAMv3DatagramSession sess) |
For subsessions created by MasterSession
|
(package private) void |
setSession(SAMv3RawSession sess) |
For subsessions created by MasterSession
|
(package private) void |
setSession(SAMv3StreamSession sess) |
For subsessions created by MasterSession
|
void |
stealSocket() |
For SAMv3StreamSession connect and accept
|
void |
stopHandling() |
Stop the SAM handler, close the socket,
unregister with the bridge.
|
boolean |
verifVersion() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloseClientSocket, getClientSocket, getWriteLock, run, shouldStop, startHandling, toString, writeBytes, writeString, writeStringcreateMessageString, execDatagramMessage, execDestMessage, execNamingMessage, execRawMessage, execStreamClose, execStreamSend, getDatagramSession, getRawSession, getStreamSession, notifyStreamDisconnection, notifyStreamIncomingConnection, notifyStreamOutgoingConnection, notifyStreamSendBufferFree, receiveDatagramBytes, receiveRawBytes, receiveStreamBytes, stopDatagramReceiving, stopRawReceiving, stopStreamReceiving, streamSendAnswer, writeStringpublic static final SessionsDB sSessionsHash
public SAMv3Handler(java.nio.channels.SocketChannel s,
int verMajor,
int verMinor,
SAMBridge parent)
throws SAMException,
java.io.IOException
s - Socket attached to a SAM clientverMajor - SAM major version to manage (should be 3)verMinor - SAM minor version to manageSAMExceptionjava.io.IOExceptionpublic SAMv3Handler(java.nio.channels.SocketChannel s,
int verMajor,
int verMinor,
java.util.Properties i2cpProps,
SAMBridge parent)
throws SAMException,
java.io.IOException
s - Socket attached to a SAM clientverMajor - SAM major version to manage (should be 3)verMinor - SAM minor version to managei2cpProps - properties to configure the I2CP connection (host, port, etc)SAMExceptionjava.io.IOExceptionpublic boolean verifVersion()
verifVersion クラス内 SAMv1Handlerpublic java.lang.String getClientIP()
public void stealSocket()
SAMBridge getBridge()
Session getSession()
void setSession(SAMv3RawSession sess)
void setSession(SAMv3DatagramSession sess)
void setSession(SAMv3StreamSession sess)
public void handle()
SAMHandlerhandle クラス内 SAMv1Handlerpublic void stopHandling()
stopHandling インタフェース内 HandlerstopHandling クラス内 SAMHandlerprotected boolean execSessionMessage(java.lang.String opcode,
java.util.Properties props)
execSessionMessage クラス内 SAMv1Handlerprotected boolean execStreamMessage(java.lang.String opcode,
java.util.Properties props)
execStreamMessage クラス内 SAMv1Handlerprotected boolean execStreamConnect(java.util.Properties props)
execStreamConnect クラス内 SAMv1Handlerpublic void notifyStreamResult(boolean verbose,
java.lang.String result,
java.lang.String message)
throws java.io.IOException
verbose - if false, does nothingresult - non-nullmessage - may be nulljava.io.IOExceptionpublic void notifyStreamIncomingConnection(Destination d, int fromPort, int toPort) throws java.io.IOException
java.io.IOExceptionpublic static void notifyStreamIncomingConnection(java.nio.channels.SocketChannel client,
Destination d)
throws java.io.IOException
java.io.IOExceptionpublic static void notifyStreamIncomingConnection(java.nio.channels.SocketChannel client,
Destination d,
int fromPort,
int toPort)
throws java.io.IOException
java.io.IOException