I2PSession, I2CPMessageReader.I2CPMessageEventListenerclass SubSession extends I2PSessionMuxedImpl
I2PSessionImpl.AvailabilityNotifier, I2PSessionImpl.StateI2PSessionMuxedImpl.MuxedAvailabilityNotifierPORT_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| Constructor | Description |
|---|---|
SubSession(I2PSession primary,
InputStream destKeyStream,
Properties options) |
| Modifier and Type | Method | 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(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.
|
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(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.
|
Destination |
lookupDest(Hash h) |
Blocking.
|
Destination |
lookupDest(Hash h,
long maxWait) |
Blocking.
|
(package private) void |
propogateError(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(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(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, waitForDatedestroySession, getTimeout, receiveMessage, receiveStatus, sendBestEffort, sendBestEffort, sendMessage, sendMessage, sendMessage, sendNoEffort, shouldCompress, startVerifyUsageaddMuxedSessionListener, addNewMessage, addSessionListener, removeListener, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setSessionListenerpublic 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 void removeSubsession(I2PSession session)
removeSubsession in interface I2PSessionremoveSubsession in class I2PSessionImplpublic List<I2PSession> getSubsessions()
getSubsessions in interface I2PSessiongetSubsessions in class I2PSessionImplpublic void updateOptions(Properties options)
updateOptions in interface I2PSessionupdateOptions in class I2PSessionImploptions - non-nullpublic Properties getPrimaryOptions()
public void connect()
throws I2PSessionException
connect in interface I2PSessionconnect in class I2PSessionImplI2PSessionException - if there is a configuration error or the router is
not reachablepublic boolean isClosed()
isClosed in interface I2PSessionisClosed in class I2PSessionImplvoid sendMessage(I2CPMessage message) throws I2PSessionException
sendMessage in class I2PSessionImplI2PSessionException - if the message is malformed or there is an error writing it outvoid sendMessage_unchecked(I2CPMessage message) throws I2PSessionException
sendMessage_unchecked in class I2PSessionImplI2PSessionException - if the message is malformed or there is an error writing it outvoid propogateError(String msg, Throwable error)
propogateError in class I2PSessionImplerror - non-nullpublic void destroySession()
destroySession in interface I2PSessiondestroySession in class I2PSessionImplprotected void disconnect()
disconnect in class I2PSessionImplprotected boolean reconnect()
I2PSessionImpl2reconnect in class I2PSessionImpl2void destReceived(Destination d)
destReceived in class I2PSessionImpld - non-nullvoid destLookupFailed(Hash h)
destLookupFailed in class I2PSessionImplh - non-nullvoid destReceived(long nonce,
Destination d)
destReceived in class I2PSessionImpld - non-nullvoid destLookupFailed(long nonce)
destLookupFailed in class I2PSessionImplvoid bwReceived(int[] i)
bwReceived 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 - msI2PSessionExceptionpublic int[] bandwidthLimits()
throws I2PSessionException
bandwidthLimits in interface I2PSessionbandwidthLimits in class I2PSessionImplI2PSessionExceptionprotected void updateActivity()
updateActivity in class I2PSessionImplpublic long lastActivity()
lastActivity in class I2PSessionImplpublic void setReduced()
setReduced in class I2PSessionImpl