class I2PSessionMuxedImpl extends I2PSessionImpl2
| Modifier and Type | Class and Description |
|---|---|
protected class | I2PSessionMuxedImpl.MuxedAvailabilityNotifierMuxedAvailabilityNotifier Extends AvailabilityNotifier. |
I2PSessionImpl.AvailabilityNotifier, I2PSessionImpl.StateI2PSession.TunnelPair_noEffort, _sendingStates, _sendMessageNonce_availabilityNotifier, _availableMessages, _bwLimits, _bwReceivedLock, _context, _handlerMap, _hostname, _leaseSet, _leaseSetWait, _log, _pendingLookups, _portNum, _producer, _queue, _reader, _sessionListener, _socket, _state, _stateLock, _transientSigningPublicKey, _tunnelStatusListeners, _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| Modifier | Constructor and Description |
|---|---|
| I2PSessionMuxedImpl(I2PAppContext ctx,
InputStream destKeyStream,
Properties options)Create a new muxed session. |
protected | I2PSessionMuxedImpl(I2PSessionImpl primary,
InputStream destKeyStream,
Properties options)For extension by SubSession. |
| Modifier and Type | Method and Description |
|---|---|
void | addMuxedSessionListener(I2PSessionMuxedListener l,
int proto,
int port)Listen on specified protocol and port, and receive notification
of proto, fromPort, and toPort for every message. |
void | addNewMessage(MessagePayloadMessage msg)Receive a payload message and let the app know its available |
void | addSessionListener(I2PSessionListener lsnr,
int proto,
int port)Listen on specified protocol and port. |
void | removeListener(int proto,
int port)Remove the specified listener (only). |
boolean | sendMessage(Destination dest,
byte[] payload)Unused, see MuxedImpl override. |
boolean | sendMessage(Destination dest,
byte[] payload,
int proto,
int fromport,
int toport)Not supported. |
boolean | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
int proto,
int fromPort,
int toPort,
SendMessageOptions options)See SendMessageOptions for option details. |
long | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
int proto,
int fromPort,
int toPort,
SendMessageOptions options,
SendMessageStatusListener listener)Send a message and request an asynchronous notification of delivery status. |
boolean | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
SessionKey keyUsed,
Set<SessionTag> tagsSent,
int proto,
int fromport,
int toport)Send a message with session key and tags. |
boolean | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
SessionKey keyUsed,
Set<SessionTag> tagsSent,
long expires)Send a message with session key and tags. |
boolean | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
SessionKey keyUsed,
Set<SessionTag> tagsSent,
long expires,
int proto,
int fromPort,
int toPort)Send a message with protocol and port information. |
boolean | sendMessage(Destination dest,
byte[] payload,
int offset,
int size,
SessionKey keyUsed,
Set<SessionTag> tagsSent,
long expires,
int proto,
int fromPort,
int toPort,
int flags)Send a message with protocol, port, and flags. |
void | setSessionListener(I2PSessionListener lsnr)Listen on all protocols and ports. |
addTunnelStatusListener, destroySession, getCurrentTunnelPair, getTimeout, notifyPoolShuttingDown, notifyTunnelFailed, notifyTunnelRemoved, rebuildTunnels, receiveMessage, receiveStatus, reconnect, removeTunnelStatusListener, sendBestEffort, sendBestEffort, sendMessage, sendMessage, sendMessage, sendNoEffort, setCurrentTunnelPair, shouldCompress, startVerifyUsage, switchToNewTunneladdSubsession, bandwidthLimits, bwReceived, changeState, clearCache, connect, dateUpdated, destLookupFailed, destLookupFailed, destReceived, destReceived, destroySession, disconnect, disconnected, getContext, getFastReceive, getHandlerMap, getLastLS2SignTime, getLeaseSet, getMyDestination, getName, getOfflineExpiration, getOfflineSignature, getOptions, getPrefix, getPrivateKey, getProducer, getRouterVersion, getSessionId, getSubsessions, getTransientSigningPublicKey, getTunnelBuildTimeout, isClosed, isOffline, lastActivity, lookupDest, lookupDest, lookupDest, lookupDest, lookupDest, lookupDest, lookupDest2, messageReceived, propagateError, readError, removeSubsession, reportAbuse, sendBlindingInfo, sendMessage_unchecked, sendMessage, setLastLS2SignTime, setLeaseSet, setReduced, setSessionId, shouldReconnect, supportsLS2, toString, updateActivity, updateOptions, verifyOpen, waitForDateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDecryptionKeypublic I2PSessionMuxedImpl(I2PAppContext ctx, InputStream destKeyStream, Properties options) throws I2PSessionException
ctx - contextdestKeyStream - stream containing the private key data,
format is specified in PrivateKeyFileoptions - set of options to configure the router with, if null will use System propertiesI2PSessionException - if there is a problem loading the private keysprotected I2PSessionMuxedImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException
primary - the primarydestKeyStream - stream containing the private key data,
format is specified in PrivateKeyFileoptions - set of options to configure the router with, if null will use System propertiesI2PSessionException - if there is a problem loading the private keyspublic void addMuxedSessionListener(I2PSessionMuxedListener l, int proto, int port)
addMuxedSessionListener in interface I2PSessionaddMuxedSessionListener in class I2PSessionImpl2proto - 1-254 or PROTO_ANY (0) for all; 255 disallowedport - 1-65535 or PORT_ANY (0) for alll - the listener to addpublic void addNewMessage(MessagePayloadMessage msg)
addNewMessage in class I2PSessionImplmsg - the payload messagepublic void addSessionListener(I2PSessionListener lsnr, int proto, int port)
addSessionListener in interface I2PSessionaddSessionListener in class I2PSessionImpl2proto - 1-254 or PROTO_ANY (0) for all; recommended:
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedport - 1-65535 or PORT_ANY (0) for alllsnr - the listener to addpublic void removeListener(int proto,
int port)removeListener in interface I2PSessionremoveListener in class I2PSessionImpl2proto - protocol numberport - port numberpublic boolean sendMessage(Destination dest, byte[] payload) throws I2PSessionException
I2PSessionImpl2sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2dest - location to send the messagepayload - body of the message to be sent (unencrypted)I2PSessionException - on errorpublic boolean sendMessage(Destination dest, byte[] payload, int proto, int fromport, int toport) throws I2PSessionException
I2PSessionImpl2sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2dest - location to send the messagepayload - body of the message to be sent (unencrypted)proto - protocol numberfromport - source porttoport - destination portI2PSessionException - on errorpublic boolean sendMessage(Destination dest, byte[] payload, int offset, int size, int proto, int fromPort, int toPort, SendMessageOptions options) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2proto - 1-254 or 0 for unset; recommended:
I2PSession.PROTO_UNSPECIFIED
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedfromPort - 1-65535 or 0 for unsettoPort - 1-65535 or 0 for unsetoptions - to be passed to the routerdest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendI2PSessionException - on errorpublic long sendMessage(Destination dest, byte[] payload, int offset, int size, int proto, int fromPort, int toPort, SendMessageOptions options, SendMessageStatusListener listener) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2dest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendproto - 1-254 or 0 for unset; recommended:
I2PSession.PROTO_UNSPECIFIED
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedfromPort - 1-65535 or 0 for unsettoPort - 1-65535 or 0 for unsetoptions - to be passed to the routerlistener - for delivery status notificationI2PSessionException - on all errorspublic boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, int proto, int fromport, int toport) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2keyUsed - unused - no end-to-end cryptotagsSent - unused - no end-to-end cryptodest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendproto - 1-254 or 0 for unset; recommended:
I2PSession.PROTO_UNSPECIFIED
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedfromport - 1-65535 or 0 for unsettoport - 1-65535 or 0 for unsetI2PSessionException - on errorpublic boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expires) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2keyUsed - unused - no end-to-end cryptotagsSent - unused - no end-to-end cryptodest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendexpires - absolute expiration timestamp, NOT interval from nowI2PSessionException - on errorpublic boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expires, int proto, int fromPort, int toPort) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2keyUsed - unused - no end-to-end cryptotagsSent - unused - no end-to-end cryptoproto - 1-254 or 0 for unset; recommended:
I2PSession.PROTO_UNSPECIFIED
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedfromPort - 1-65535 or 0 for unsettoPort - 1-65535 or 0 for unsetdest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendexpires - absolute expiration timestamp, NOT interval from nowI2PSessionException - on errorpublic boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expires, int proto, int fromPort, int toPort, int flags) throws I2PSessionException
sendMessage in interface I2PSessionsendMessage in class I2PSessionImpl2keyUsed - unused - no end-to-end cryptotagsSent - unused - no end-to-end cryptoproto - 1-254 or 0 for unset; recommended:
I2PSession.PROTO_UNSPECIFIED
I2PSession.PROTO_STREAMING
I2PSession.PROTO_DATAGRAM
255 disallowedfromPort - 1-65535 or 0 for unsettoPort - 1-65535 or 0 for unsetflags - to be passed to the routerdest - location to send the messagepayload - body of the message to be sent (unencrypted)offset - offset into the payloadsize - number of bytes to sendexpires - absolute expiration timestamp, NOT interval from nowI2PSessionException - on errorpublic void setSessionListener(I2PSessionListener lsnr)
setSessionListener in interface I2PSessionsetSessionListener in class I2PSessionImpllsnr - listener to retrieve events