@since updates

This commit is contained in:
zzz
2015-06-10 19:15:01 +00:00
parent f341e5566b
commit 605602e001
9 changed files with 31 additions and 34 deletions

View File

@ -42,18 +42,18 @@ public interface I2PSocketManager {
* @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session * @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session
* and different signing keys * and different signing keys
* @param opts subsession options if any, may be null * @param opts subsession options if any, may be null
* @since 0.9.19 * @since 0.9.21
*/ */
public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException; public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException;
/** /**
* @since 0.9.19 * @since 0.9.21
*/ */
public void removeSubsession(I2PSession session); public void removeSubsession(I2PSession session);
/** /**
* @return a list of subsessions, non-null, does not include the primary session * @return a list of subsessions, non-null, does not include the primary session
* @since 0.9.19 * @since 0.9.21
*/ */
public List<I2PSession> getSubsessions(); public List<I2PSession> getSubsessions();

View File

@ -255,19 +255,19 @@ public interface I2PSession {
* @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session * @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session
* and different signing keys * and different signing keys
* @param opts subsession options if any, may be null * @param opts subsession options if any, may be null
* @since 0.9.19 * @since 0.9.21
*/ */
public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException; public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException;
/** /**
* @return a list of subsessions, non-null, does not include the primary session * @return a list of subsessions, non-null, does not include the primary session
* @since 0.9.19 * @since 0.9.21
*/ */
public void removeSubsession(I2PSession session); public void removeSubsession(I2PSession session);
/** /**
* @return a list of subsessions, non-null, does not include the primary session * @return a list of subsessions, non-null, does not include the primary session
* @since 0.9.19 * @since 0.9.21
*/ */
public List<I2PSession> getSubsessions(); public List<I2PSession> getSubsessions();

View File

@ -226,7 +226,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
* @param destKeyStream stream containing the private key data, * @param destKeyStream stream containing the private key data,
* format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
* @param options set of options to configure the router with, if null will use System properties * @param options set of options to configure the router with, if null will use System properties
* @since 0.9.19 * @since 0.9.21
*/ */
protected I2PSessionImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException { protected I2PSessionImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
this(primary.getContext(), options, primary.getHandlerMap(), primary.getProducer(), true); this(primary.getContext(), options, primary.getHandlerMap(), primary.getProducer(), true);
@ -307,7 +307,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
* @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session * @param privateKeyStream null for transient, if non-null must have same encryption keys as primary session
* and different signing keys * and different signing keys
* @param opts subsession options if any, may be null * @param opts subsession options if any, may be null
* @since 0.9.19 * @since 0.9.21
*/ */
public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException { public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException {
if (!_routerSupportsSubsessions) if (!_routerSupportsSubsessions)
@ -335,7 +335,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
} }
/** /**
* @since 0.9.19 * @since 0.9.21
*/ */
public void removeSubsession(I2PSession session) { public void removeSubsession(I2PSession session) {
if (!(session instanceof SubSession)) if (!(session instanceof SubSession))
@ -355,7 +355,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
/** /**
* @return a list of subsessions, non-null, does not include the primary session * @return a list of subsessions, non-null, does not include the primary session
* @since 0.9.19 * @since 0.9.21
*/ */
public List<I2PSession> getSubsessions() { public List<I2PSession> getSubsessions() {
synchronized(_subsessionLock) { synchronized(_subsessionLock) {
@ -985,13 +985,13 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
/** /**
* For Subsessions * For Subsessions
* @since 0.9.19 * @since 0.9.21
*/ */
I2PClientMessageHandlerMap getHandlerMap() { return _handlerMap; } I2PClientMessageHandlerMap getHandlerMap() { return _handlerMap; }
/** /**
* For Subsessions * For Subsessions
* @since 0.9.19 * @since 0.9.21
*/ */
I2PAppContext getContext() { return _context; } I2PAppContext getContext() { return _context; }

View File

@ -102,7 +102,7 @@ class I2PSessionImpl2 extends I2PSessionImpl {
* @param destKeyStream stream containing the private key data, * @param destKeyStream stream containing the private key data,
* format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
* @param options set of options to configure the router with, if null will use System properties * @param options set of options to configure the router with, if null will use System properties
* @since 0.9.19 * @since 0.9.21
*/ */
protected I2PSessionImpl2(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException { protected I2PSessionImpl2(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
super(primary, destKeyStream, options); super(primary, destKeyStream, options);

View File

@ -89,7 +89,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
* @param destKeyStream stream containing the private key data, * @param destKeyStream stream containing the private key data,
* format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
* @param options set of options to configure the router with, if null will use System properties * @param options set of options to configure the router with, if null will use System properties
* @since 0.9.19 * @since 0.9.21
*/ */
protected I2PSessionMuxedImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException { protected I2PSessionMuxedImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
super(primary, destKeyStream, options); super(primary, destKeyStream, options);

View File

@ -225,7 +225,7 @@ class RequestLeaseSetMessageHandler extends HandlerImpl {
/** /**
* Existing crypto key, new signing key * Existing crypto key, new signing key
* @since 0.9.20 * @since 0.9.21
*/ */
public LeaseInfo(PrivateKey privKey, Destination dest) { public LeaseInfo(PrivateKey privKey, Destination dest) {
SimpleDataStructure signKeys[]; SimpleDataStructure signKeys[];

View File

@ -43,7 +43,7 @@ import net.i2p.util.I2PAppThread;
* While the I2CP protocol, in theory, allows for fully independent sessions * While the I2CP protocol, in theory, allows for fully independent sessions
* over the same I2CP connection, this is not currently supported by the router. * over the same I2CP connection, this is not currently supported by the router.
* *
* @since 0.9.19 * @since 0.9.21
*/ */
class SubSession extends I2PSessionMuxedImpl { class SubSession extends I2PSessionMuxedImpl {
private final I2PSessionMuxedImpl _primary; private final I2PSessionMuxedImpl _primary;
@ -64,7 +64,6 @@ class SubSession extends I2PSessionMuxedImpl {
/** /**
* Unsupported in a subsession. * Unsupported in a subsession.
* @throws UnsupportedOperationException always * @throws UnsupportedOperationException always
* @since 0.9.19
*/ */
@Override @Override
public I2PSession addSubsession(InputStream destKeyStream, Properties opts) throws I2PSessionException { public I2PSession addSubsession(InputStream destKeyStream, Properties opts) throws I2PSessionException {
@ -74,7 +73,6 @@ class SubSession extends I2PSessionMuxedImpl {
/** /**
* Unsupported in a subsession. * Unsupported in a subsession.
* Does nothing. * Does nothing.
* @since 0.9.19
*/ */
@Override @Override
public void removeSubsession(I2PSession session) {} public void removeSubsession(I2PSession session) {}
@ -82,7 +80,6 @@ class SubSession extends I2PSessionMuxedImpl {
/** /**
* Unsupported in a subsession. * Unsupported in a subsession.
* @return empty list always * @return empty list always
* @since 0.9.19
*/ */
@Override @Override
public List<I2PSession> getSubsessions() { public List<I2PSession> getSubsessions() {

View File

@ -115,7 +115,7 @@ class ClientConnectionRunner {
/** /**
* For multisession * For multisession
* @since 0.9.19 * @since 0.9.21
*/ */
private static class SessionParams { private static class SessionParams {
final Destination dest; final Destination dest;
@ -213,7 +213,7 @@ class ClientConnectionRunner {
* Current client's config, * Current client's config,
* will be null if session not found * will be null if session not found
* IS subsession aware. * IS subsession aware.
* @since 0.9.19 added hash param * @since 0.9.21 added hash param
*/ */
public SessionConfig getConfig(Hash h) { public SessionConfig getConfig(Hash h) {
SessionParams sp = _sessions.get(h); SessionParams sp = _sessions.get(h);
@ -226,7 +226,7 @@ class ClientConnectionRunner {
* Current client's config, * Current client's config,
* will be null if session not found * will be null if session not found
* IS subsession aware. * IS subsession aware.
* @since 0.9.19 added id param * @since 0.9.21 added id param
*/ */
public SessionConfig getConfig(SessionId id) { public SessionConfig getConfig(SessionId id) {
for (SessionParams sp : _sessions.values()) { for (SessionParams sp : _sessions.values()) {
@ -239,7 +239,7 @@ class ClientConnectionRunner {
/** /**
* Primary client's config, * Primary client's config,
* will be null if session not set up * will be null if session not set up
* @since 0.9.19 * @since 0.9.21
*/ */
public SessionConfig getPrimaryConfig() { public SessionConfig getPrimaryConfig() {
for (SessionParams sp : _sessions.values()) { for (SessionParams sp : _sessions.values()) {
@ -273,7 +273,7 @@ class ClientConnectionRunner {
* Currently allocated leaseSet. * Currently allocated leaseSet.
* IS subsession aware. Returns primary leaseset only. * IS subsession aware. Returns primary leaseset only.
* @return leaseSet or null if not yet set or unknown hash * @return leaseSet or null if not yet set or unknown hash
* @since 0.9.19 added hash parameter * @since 0.9.21 added hash parameter
*/ */
public LeaseSet getLeaseSet(Hash h) { public LeaseSet getLeaseSet(Hash h) {
SessionParams sp = _sessions.get(h); SessionParams sp = _sessions.get(h);
@ -312,7 +312,7 @@ class ClientConnectionRunner {
/** /**
* Return the hash for the given ID * Return the hash for the given ID
* @return hash or null if unknown * @return hash or null if unknown
* @since 0.9.19 * @since 0.9.21
*/ */
public Hash getDestHash(SessionId id) { public Hash getDestHash(SessionId id) {
for (Map.Entry<Hash, SessionParams> e : _sessions.entrySet()) { for (Map.Entry<Hash, SessionParams> e : _sessions.entrySet()) {
@ -325,7 +325,7 @@ class ClientConnectionRunner {
/** /**
* Return the dest for the given ID * Return the dest for the given ID
* @return dest or null if unknown * @return dest or null if unknown
* @since 0.9.19 * @since 0.9.21
*/ */
public Destination getDestination(SessionId id) { public Destination getDestination(SessionId id) {
for (SessionParams sp : _sessions.values()) { for (SessionParams sp : _sessions.values()) {
@ -340,7 +340,7 @@ class ClientConnectionRunner {
* *
* @param h the local target * @param h the local target
* @return current client's sessionId or null if not yet set or not a valid hash * @return current client's sessionId or null if not yet set or not a valid hash
* @since 0.9.19 * @since 0.9.21
*/ */
SessionId getSessionId(Hash h) { SessionId getSessionId(Hash h) {
SessionParams sp = _sessions.get(h); SessionParams sp = _sessions.get(h);
@ -353,7 +353,7 @@ class ClientConnectionRunner {
* Subsession aware. * Subsession aware.
* *
* @return all current client's sessionIds, non-null * @return all current client's sessionIds, non-null
* @since 0.9.19 * @since 0.9.21
*/ */
List<SessionId> getSessionIds() { List<SessionId> getSessionIds() {
List<SessionId> rv = new ArrayList<SessionId>(_sessions.size()); List<SessionId> rv = new ArrayList<SessionId>(_sessions.size());
@ -369,7 +369,7 @@ class ClientConnectionRunner {
* Subsession aware. * Subsession aware.
* *
* @return all current client's destinations, non-null * @return all current client's destinations, non-null
* @since 0.9.19 * @since 0.9.21
*/ */
List<Destination> getDestinations() { List<Destination> getDestinations() {
List<Destination> rv = new ArrayList<Destination>(_sessions.size()); List<Destination> rv = new ArrayList<Destination>(_sessions.size());
@ -384,7 +384,7 @@ class ClientConnectionRunner {
* *
* @param hash for the session * @param hash for the session
* @throws IllegalStateException if already set * @throws IllegalStateException if already set
* @since 0.9.19 added hash param * @since 0.9.21 added hash param
*/ */
void setSessionId(Hash hash, SessionId id) { void setSessionId(Hash hash, SessionId id) {
if (hash == null) if (hash == null)
@ -398,7 +398,7 @@ class ClientConnectionRunner {
/** /**
* Kill the session. Caller must kill runner if none left. * Kill the session. Caller must kill runner if none left.
* *
* @since 0.9.19 * @since 0.9.21
*/ */
void removeSession(SessionId id) { void removeSession(SessionId id) {
boolean isPrimary = false; boolean isPrimary = false;
@ -430,7 +430,7 @@ class ClientConnectionRunner {
/** /**
* Data for the current leaseRequest, or null if there is no active leaseSet request. * Data for the current leaseRequest, or null if there is no active leaseSet request.
* Not subsession aware. Returns primary ID only. * Not subsession aware. Returns primary ID only.
* @since 0.9.19 added hash param * @since 0.9.21 added hash param
*/ */
LeaseRequestState getLeaseRequest(Hash h) { LeaseRequestState getLeaseRequest(Hash h) {
SessionParams sp = _sessions.get(h); SessionParams sp = _sessions.get(h);
@ -720,7 +720,7 @@ class ClientConnectionRunner {
* *
* @param toHash non-null * @param toHash non-null
* @param fromDest generally null when from remote, non-null if from local * @param fromDest generally null when from remote, non-null if from local
* @since 0.9.20 * @since 0.9.21
*/ */
void receiveMessage(Hash toHash, Destination fromDest, Payload payload) { void receiveMessage(Hash toHash, Destination fromDest, Payload payload) {
SessionParams sp = _sessions.get(toHash); SessionParams sp = _sessions.get(toHash);

View File

@ -242,7 +242,7 @@ class ClientManager {
/** /**
* Remove only the following session. Does not remove the runner if it has more. * Remove only the following session. Does not remove the runner if it has more.
* *
* @since 0.9.19 * @since 0.9.21
*/ */
public void unregisterSession(SessionId id, Destination dest) { public void unregisterSession(SessionId id, Destination dest) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))