class SubSession extends I2PSessionMuxedImpl
I2PSessionMuxedImpl.MuxedAvailabilityNotifierI2PSessionImpl.AvailabilityNotifier, I2PSessionImpl.State_noEffort, _sendingStates, _sendMessageNonce_availabilityNotifier, _availableMessages, _bwLimits, _bwReceivedLock, _context, _handlerMap, _hostname, _leaseSet, _leaseSetWait, _log, _pendingLookups, _portNum, _producer, _queue, _reader, _sessionListener, _socket, _state, _stateLock, _transientSigningPublicKey, _writer, CACHE_MAX_SIZE, DUMMY_SESSION, LISTEN_PORT, PROP_DOMAIN_SOCKETPORT_ANY, PORT_UNSPECIFIED, PROTO_ANY, PROTO_DATAGRAM, PROTO_DATAGRAM_RAW, PROTO_DATAGRAM2, PROTO_DATAGRAM3, PROTO_STREAMING, PROTO_UNSPECIFIED| Constructor and Description |
|---|
SubSession(I2PSession primary,
InputStream destKeyStream,
Properties options) |
| Modifier and Type | Method and Description |
|---|---|
I2PSession |
addSubsession(InputStream destKeyStream,
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(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 |
destLookupFailed(long nonce,
int code)
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.
|
(package private) void |
destReceived(long nonce,
Destination d)
Called by the message handler
on reception of HostReplyMessage
|
void |
destroySession()
Tear down the session, and do NOT reconnect.
|
protected void |
disconnect()
Will interrupt a connect in progress.
|
Properties |
getPrimaryOptions() |
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(Hash h)
Blocking.
|
Destination |
lookupDest(Hash h,
long maxWait)
Blocking.
|
Destination |
lookupDest(String name)
Ask the router to lookup a Destination by host name.
|
Destination |
lookupDest(String name,
long maxWait)
Ask the router to lookup a Destination by host name.
|
(package private) void |
propagateError(String msg,
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_unchecked(I2CPMessage message)
Deliver an I2CP message to the router.
|
(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
|
void |
setReduced() |
protected void |
updateActivity() |
void |
updateOptions(Properties options)
Does nothing for now
|
addMuxedSessionListener, addNewMessage, addSessionListener, removeListener, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setSessionListenerdestroySession, getTimeout, receiveMessage, receiveStatus, sendBestEffort, sendBestEffort, sendMessage, sendMessage, sendMessage, sendNoEffort, shouldCompress, startVerifyUsagechangeState, clearCache, dateUpdated, disconnected, getContext, getFastReceive, getHandlerMap, getLastLS2SignTime, getLeaseSet, getMyDestination, getName, getOfflineExpiration, getOfflineSignature, getOptions, getPrefix, getPrivateKey, getProducer, getRouterVersion, getSessionId, getTransientSigningPublicKey, isOffline, lookupDest, lookupDest, lookupDest2, messageReceived, readError, reportAbuse, sendBlindingInfo, setLastLS2SignTime, setLeaseSet, setSessionId, shouldReconnect, supportsLS2, toString, verifyOpen, waitForDatepublic SubSession(I2PSession primary, InputStream destKeyStream, Properties options) throws I2PSessionException
primary - must be a I2PSessionMuxedImplI2PSessionExceptionpublic I2PSession addSubsession(InputStream destKeyStream, Properties opts) throws I2PSessionException
addSubsession in interface I2PSessionaddSubsession in class I2PSessionImpldestKeyStream - null for transient, if non-null must have same encryption keys as primary session
and different signing keysopts - subsession options if any, may be nullUnsupportedOperationException - alwaysI2PSessionExceptionpublic int[] bandwidthLimits()
throws I2PSessionException
bandwidthLimits in interface I2PSessionbandwidthLimits in class I2PSessionImplI2PSessionExceptionvoid bwReceived(int[] i)
bwReceived in class I2PSessionImplpublic void connect()
throws I2PSessionException
connect in interface I2PSessionconnect in class I2PSessionImplI2PSessionException - if there is a configuration error or the router is
not reachablevoid destLookupFailed(Hash h)
destLookupFailed in class I2PSessionImplh - non-nullvoid destLookupFailed(long nonce,
int code)
destLookupFailed in class I2PSessionImplvoid destReceived(Destination d)
destReceived in class I2PSessionImpld - non-nullvoid destReceived(long nonce,
Destination d)
destReceived in class I2PSessionImpld - non-nullpublic void destroySession()
destroySession in interface I2PSessiondestroySession in class I2PSessionImplprotected void disconnect()
disconnect in class I2PSessionImplpublic Properties getPrimaryOptions()
public List<I2PSession> getSubsessions()
getSubsessions in interface I2PSessiongetSubsessions in class I2PSessionImplpublic boolean isClosed()
isClosed in interface I2PSessionisClosed in class I2PSessionImplpublic long lastActivity()
lastActivity in class I2PSessionImplpublic Destination lookupDest(Hash h) throws I2PSessionException
lookupDest in interface I2PSessionlookupDest in class I2PSessionImplI2PSessionExceptionpublic Destination lookupDest(Hash h, long maxWait) throws I2PSessionException
lookupDest in interface I2PSessionlookupDest in class I2PSessionImplmaxWait - msI2PSessionExceptionpublic Destination lookupDest(String name) throws I2PSessionException
lookupDest in interface I2PSessionlookupDest in class I2PSessionImplI2PSessionExceptionpublic Destination lookupDest(String name, long maxWait) throws I2PSessionException
lookupDest in interface I2PSessionlookupDest in class I2PSessionImplmaxWait - msI2PSessionExceptionvoid propagateError(String msg, Throwable error)
propagateError in class I2PSessionImplerror - non-nullprotected boolean reconnect()
I2PSessionImpl2reconnect in class I2PSessionImpl2public void removeSubsession(I2PSession session)
removeSubsession in interface I2PSessionremoveSubsession in class I2PSessionImplvoid sendMessage_unchecked(I2CPMessage message) throws I2PSessionException
sendMessage_unchecked in class I2PSessionImplI2PSessionException - if the message is malformed or there is an error writing it outvoid sendMessage(I2CPMessage message) throws I2PSessionException
sendMessage in class I2PSessionImplI2PSessionException - if the message is malformed or there is an error writing it outpublic void setReduced()
setReduced in class I2PSessionImplprotected void updateActivity()
updateActivity in class I2PSessionImplpublic void updateOptions(Properties options)
updateOptions in interface I2PSessionupdateOptions in class I2PSessionImploptions - non-null