@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
* and different signing keys
* @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;
/**
* @since 0.9.19
* @since 0.9.21
*/
public void removeSubsession(I2PSession 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();

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
* and different signing keys
* @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;
/**
* @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);
/**
* @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();

View File

@ -226,7 +226,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
* @param destKeyStream stream containing the private key data,
* 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
* @since 0.9.19
* @since 0.9.21
*/
protected I2PSessionImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
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
* and different signing keys
* @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 {
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) {
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
* @since 0.9.19
* @since 0.9.21
*/
public List<I2PSession> getSubsessions() {
synchronized(_subsessionLock) {
@ -985,13 +985,13 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
/**
* For Subsessions
* @since 0.9.19
* @since 0.9.21
*/
I2PClientMessageHandlerMap getHandlerMap() { return _handlerMap; }
/**
* For Subsessions
* @since 0.9.19
* @since 0.9.21
*/
I2PAppContext getContext() { return _context; }

View File

@ -102,7 +102,7 @@ class I2PSessionImpl2 extends I2PSessionImpl {
* @param destKeyStream stream containing the private key data,
* 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
* @since 0.9.19
* @since 0.9.21
*/
protected I2PSessionImpl2(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
super(primary, destKeyStream, options);

View File

@ -89,7 +89,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
* @param destKeyStream stream containing the private key data,
* 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
* @since 0.9.19
* @since 0.9.21
*/
protected I2PSessionMuxedImpl(I2PSessionImpl primary, InputStream destKeyStream, Properties options) throws I2PSessionException {
super(primary, destKeyStream, options);

View File

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

View File

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

View File

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