I2PSession
, I2CPMessageReader.I2CPMessageEventListener
class SubSession extends I2PSessionMuxedImpl
I2PSessionImpl.AvailabilityNotifier, I2PSessionImpl.State
I2PSessionMuxedImpl.MuxedAvailabilityNotifier
PORT_ANY, PORT_UNSPECIFIED, PROTO_ANY, PROTO_DATAGRAM, PROTO_DATAGRAM_RAW, PROTO_STREAMING, PROTO_UNSPECIFIED
_availabilityNotifier, _availableMessages, _bwLimits, _bwReceivedLock, _context, _handlerMap, _hostname, _leaseSet, _leaseSetWait, _log, _pendingLookups, _portNum, _producer, _queue, _reader, _sessionListener, _socket, _state, _stateLock, _writer, CACHE_MAX_SIZE, LISTEN_PORT, PROP_DOMAIN_SOCKET, PROP_ENABLE_SSL, PROP_PW, PROP_USER
_noEffort, _sendingStates, _sendMessageNonce
コンストラクタ | 説明 |
---|---|
SubSession(I2PSession primary,
java.io.InputStream destKeyStream,
java.util.Properties options) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
I2PSession |
addSubsession(java.io.InputStream destKeyStream,
java.util.Properties opts) |
Unsupported in a subsession.
|
int[] |
bandwidthLimits() |
This won't be called, as the reply does not contain a session ID, so
it won't be routed back to us
|
(package private) void |
bwReceived(int[] i) |
Called by the message handler.
|
void |
connect() |
Connect to the router and establish a session.
|
(package private) void |
destLookupFailed(long nonce) |
Called by the message handler
on reception of HostReplyMessage
|
(package private) void |
destLookupFailed(Hash h) |
Called by the message handler
on reception of DestReplyMessage
This will never happen, as the dest reply message does not contain a session ID.
|
(package private) void |
destReceived(long nonce,
Destination d) |
Called by the message handler
on reception of HostReplyMessage
|
(package private) void |
destReceived(Destination d) |
Called by the message handler
on reception of DestReplyMessage
This will never happen, as the dest reply message does not contain a session ID.
|
void |
destroySession() |
Tear down the session, and do NOT reconnect.
|
protected void |
disconnect() |
Will interrupt a connect in progress.
|
java.util.Properties |
getPrimaryOptions() |
|
java.util.List<I2PSession> |
getSubsessions() |
Unsupported in a subsession.
|
boolean |
isClosed() |
Has the session been closed (or not yet connected)?
False when open and during transitions.
|
long |
lastActivity() |
|
Destination |
lookupDest(java.lang.String name) |
Ask the router to lookup a Destination by host name.
|
Destination |
lookupDest(java.lang.String name,
long maxWait) |
Ask the router to lookup a Destination by host name.
|
Destination |
lookupDest(Hash h) |
Blocking.
|
Destination |
lookupDest(Hash h,
long maxWait) |
Blocking.
|
(package private) void |
propogateError(java.lang.String msg,
java.lang.Throwable error) |
Pass off the error to the listener
Misspelled, oh well.
|
protected boolean |
reconnect() |
Called whenever we want to reconnect (used only in the superclass).
|
void |
removeSubsession(I2PSession session) |
Unsupported in a subsession.
|
(package private) void |
sendMessage(I2CPMessage message) |
Deliver an I2CP message to the router
May block for several seconds if the write queue to the router is full
|
(package private) void |
sendMessage_unchecked(I2CPMessage message) |
Deliver an I2CP message to the router.
|
void |
setReduced() |
|
protected void |
updateActivity() |
|
void |
updateOptions(java.util.Properties options) |
Does nothing for now
|
changeState, clearCache, dateUpdated, disconnected, getContext, getDecryptionKey, getFastReceive, getHandlerMap, getLeaseSet, getMyDestination, getOptions, getPrefix, getPrivateKey, getProducer, getSessionId, messageReceived, readError, reportAbuse, setLeaseSet, setSessionId, shouldReconnect, toString, verifyOpen, waitForDate
destroySession, getTimeout, receiveMessage, receiveStatus, sendBestEffort, sendBestEffort, sendMessage, sendMessage, sendMessage, sendNoEffort, shouldCompress, startVerifyUsage
addMuxedSessionListener, addNewMessage, addSessionListener, removeListener, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setSessionListener
public SubSession(I2PSession primary, java.io.InputStream destKeyStream, java.util.Properties options) throws I2PSessionException
primary
- must be a I2PSessionMuxedImplI2PSessionException
public I2PSession addSubsession(java.io.InputStream destKeyStream, java.util.Properties opts) throws I2PSessionException
addSubsession
インタフェース内 I2PSession
addSubsession
クラス内 I2PSessionImpl
destKeyStream
- null for transient, if non-null must have same encryption keys as primary session
and different signing keysopts
- subsession options if any, may be nulljava.lang.UnsupportedOperationException
- alwaysI2PSessionException
public void removeSubsession(I2PSession session)
removeSubsession
インタフェース内 I2PSession
removeSubsession
クラス内 I2PSessionImpl
public java.util.List<I2PSession> getSubsessions()
getSubsessions
インタフェース内 I2PSession
getSubsessions
クラス内 I2PSessionImpl
public void updateOptions(java.util.Properties options)
updateOptions
インタフェース内 I2PSession
updateOptions
クラス内 I2PSessionImpl
options
- non-nullpublic java.util.Properties getPrimaryOptions()
public void connect() throws I2PSessionException
connect
インタフェース内 I2PSession
connect
クラス内 I2PSessionImpl
I2PSessionException
- if there is a configuration error or the router is
not reachablepublic boolean isClosed()
isClosed
インタフェース内 I2PSession
isClosed
クラス内 I2PSessionImpl
void sendMessage(I2CPMessage message) throws I2PSessionException
sendMessage
クラス内 I2PSessionImpl
I2PSessionException
- if the message is malformed or there is an error writing it outvoid sendMessage_unchecked(I2CPMessage message) throws I2PSessionException
sendMessage_unchecked
クラス内 I2PSessionImpl
I2PSessionException
- if the message is malformed or there is an error writing it outvoid propogateError(java.lang.String msg, java.lang.Throwable error)
propogateError
クラス内 I2PSessionImpl
error
- non-nullpublic void destroySession()
destroySession
インタフェース内 I2PSession
destroySession
クラス内 I2PSessionImpl
protected void disconnect()
disconnect
クラス内 I2PSessionImpl
protected boolean reconnect()
I2PSessionImpl2
reconnect
クラス内 I2PSessionImpl2
void destReceived(Destination d)
destReceived
クラス内 I2PSessionImpl
d
- non-nullvoid destLookupFailed(Hash h)
destLookupFailed
クラス内 I2PSessionImpl
h
- non-nullvoid destReceived(long nonce, Destination d)
destReceived
クラス内 I2PSessionImpl
d
- non-nullvoid destLookupFailed(long nonce)
destLookupFailed
クラス内 I2PSessionImpl
void bwReceived(int[] i)
bwReceived
クラス内 I2PSessionImpl
public Destination lookupDest(Hash h) throws I2PSessionException
lookupDest
インタフェース内 I2PSession
lookupDest
クラス内 I2PSessionImpl
I2PSessionException
public Destination lookupDest(Hash h, long maxWait) throws I2PSessionException
lookupDest
インタフェース内 I2PSession
lookupDest
クラス内 I2PSessionImpl
maxWait
- msI2PSessionException
public Destination lookupDest(java.lang.String name) throws I2PSessionException
lookupDest
インタフェース内 I2PSession
lookupDest
クラス内 I2PSessionImpl
I2PSessionException
public Destination lookupDest(java.lang.String name, long maxWait) throws I2PSessionException
lookupDest
インタフェース内 I2PSession
lookupDest
クラス内 I2PSessionImpl
maxWait
- msI2PSessionException
public int[] bandwidthLimits() throws I2PSessionException
bandwidthLimits
インタフェース内 I2PSession
bandwidthLimits
クラス内 I2PSessionImpl
I2PSessionException
protected void updateActivity()
updateActivity
クラス内 I2PSessionImpl
public long lastActivity()
lastActivity
クラス内 I2PSessionImpl
public void setReduced()
setReduced
クラス内 I2PSessionImpl