Changeset 4e6ddfc
- Timestamp:
- Oct 17, 2015 2:01:08 PM (5 years ago)
- Branches:
- master
- Children:
- 9bddba5
- Parents:
- 3411a7c
- Location:
- core/java/src/net/i2p
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/I2PAppContext.java
r3411a7c r4e6ddfc 85 85 private KeyGenerator _keyGenerator; 86 86 protected KeyRing _keyRing; // overridden in RouterContext 87 @SuppressWarnings("deprecation") 87 88 private SimpleScheduler _simpleScheduler; 88 89 private SimpleTimer _simpleTimer; … … 533 534 */ 534 535 @SuppressWarnings({ "unchecked", "rawtypes" }) 535 536 public Set<String> getPropertyNames() { 536 537 // clone to avoid ConcurrentModificationException 537 538 Set<String> names = new HashSet<String>((Set<String>) (Set) ((Properties) System.getProperties().clone()).keySet()); // TODO-Java6: s/keySet()/stringPropertyNames()/ … … 941 942 * @deprecated in 0.9.20, use simpleTimer2() 942 943 */ 944 @SuppressWarnings("deprecation") 943 945 public SimpleScheduler simpleScheduler() { 944 946 if (!_simpleSchedulerInitialized) -
core/java/src/net/i2p/client/I2PSession.java
r3411a7c r4e6ddfc 19 19 import net.i2p.data.PrivateKey; 20 20 import net.i2p.data.SessionKey; 21 import net.i2p.data.SessionTag; 21 22 import net.i2p.data.SigningPrivateKey; 22 23 … … 99 100 * @return success 100 101 */ 101 public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException;102 public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set<SessionTag> tagsSent) throws I2PSessionException; 102 103 103 104 /** … … 107 108 * @return success 108 109 */ 109 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException;110 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent) throws I2PSessionException; 110 111 111 112 /** … … 117 118 * @since 0.7.1 118 119 */ 119 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire) throws I2PSessionException;120 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expire) throws I2PSessionException; 120 121 121 122 /** … … 134 135 * @since 0.7.1 135 136 */ 136 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent,137 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, 137 138 int proto, int fromPort, int toPort) throws I2PSessionException; 138 139 … … 153 154 * @since 0.7.1 154 155 */ 155 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire,156 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expire, 156 157 int proto, int fromPort, int toPort) throws I2PSessionException; 157 158 … … 172 173 * @since 0.8.4 173 174 */ 174 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire,175 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expire, 175 176 int proto, int fromPort, int toPort, int flags) throws I2PSessionException; 176 177 -
core/java/src/net/i2p/client/impl/I2CPMessageProducer.java
r3411a7c r4e6ddfc 133 133 */ 134 134 public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SessionTag tag, 135 SessionKey key, Set tags, SessionKey newKey, long expires) throws I2PSessionException {135 SessionKey key, Set<SessionTag> tags, SessionKey newKey, long expires) throws I2PSessionException { 136 136 sendMessage(session, dest, nonce, payload, expires, 0); 137 137 } -
core/java/src/net/i2p/client/impl/I2PSessionImpl2.java
r3411a7c r4e6ddfc 30 30 import net.i2p.data.Destination; 31 31 import net.i2p.data.SessionKey; 32 import net.i2p.data.SessionTag; 32 33 import net.i2p.data.i2cp.MessageId; 33 34 import net.i2p.data.i2cp.MessageStatusMessage; … … 211 212 } 212 213 /** @throws UnsupportedOperationException always, use MuxedImpl */ 213 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent,214 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, 214 215 int proto, int fromport, int toport) throws I2PSessionException { 215 216 throw new UnsupportedOperationException("Use MuxedImpl"); 216 217 } 217 218 /** @throws UnsupportedOperationException always, use MuxedImpl */ 218 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire,219 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expire, 219 220 int proto, int fromport, int toport) throws I2PSessionException { 220 221 throw new UnsupportedOperationException("Use MuxedImpl"); 221 222 } 222 223 /** @throws UnsupportedOperationException always, use MuxedImpl */ 223 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire,224 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expire, 224 225 int proto, int fromport, int toport, int flags) throws I2PSessionException { 225 226 throw new UnsupportedOperationException("Use MuxedImpl"); … … 254 255 */ 255 256 @Override 256 public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException {257 public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set<SessionTag> tagsSent) throws I2PSessionException { 257 258 return sendMessage(dest, payload, 0, payload.length, keyUsed, tagsSent, 0); 258 259 } … … 262 263 * @param tagsSent unused - no end-to-end crypto 263 264 */ 264 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent)265 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent) 265 266 throws I2PSessionException { 266 267 return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0); … … 273 274 * @param tagsSent unused - no end-to-end crypto 274 275 */ 275 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expires)276 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, long expires) 276 277 throws I2PSessionException { 277 278 if (_log.shouldLog(Log.DEBUG)) _log.debug("sending message"); … … 340 341 * @param tagsSent unused - no end-to-end crypto 341 342 */ 342 protected boolean sendBestEffort(Destination dest, byte payload[], SessionKey keyUsed, Set tagsSent, long expires)343 protected boolean sendBestEffort(Destination dest, byte payload[], SessionKey keyUsed, Set<SessionTag> tagsSent, long expires) 343 344 throws I2PSessionException { 344 345 return sendBestEffort(dest, payload, expires, 0); -
core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
r3411a7c r4e6ddfc 20 20 import net.i2p.data.Destination; 21 21 import net.i2p.data.SessionKey; 22 import net.i2p.data.SessionTag; 22 23 import net.i2p.data.i2cp.MessagePayloadMessage; 23 24 import net.i2p.util.Log; … … 164 165 @Override 165 166 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, 166 SessionKey keyUsed, Set tagsSent, long expires)167 SessionKey keyUsed, Set<SessionTag> tagsSent, long expires) 167 168 throws I2PSessionException { 168 169 return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0, PROTO_UNSPECIFIED, PORT_UNSPECIFIED, PORT_UNSPECIFIED); … … 174 175 */ 175 176 @Override 176 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent,177 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set<SessionTag> tagsSent, 177 178 int proto, int fromport, int toport) throws I2PSessionException { 178 179 return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0, proto, fromport, toport); … … 193 194 @Override 194 195 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, 195 SessionKey keyUsed, Set tagsSent, long expires,196 SessionKey keyUsed, Set<SessionTag> tagsSent, long expires, 196 197 int proto, int fromPort, int toPort) 197 198 throws I2PSessionException { … … 214 215 @Override 215 216 public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, 216 SessionKey keyUsed, Set tagsSent, long expires,217 SessionKey keyUsed, Set<SessionTag> tagsSent, long expires, 217 218 int proto, int fromPort, int toPort, int flags) 218 219 throws I2PSessionException { -
core/java/src/net/i2p/client/naming/NamingService.java
r3411a7c r4e6ddfc 537 537 try { 538 538 Class<?> cls = Class.forName(impl); 539 Constructor<?> con = cls.getConstructor( new Class[] { I2PAppContext.class });539 Constructor<?> con = cls.getConstructor(I2PAppContext.class); 540 540 instance = (NamingService)con.newInstance(new Object[] { context }); 541 541 } catch (Exception ex) { -
core/java/src/net/i2p/data/SDSCache.java
r3411a7c r4e6ddfc 47 47 //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class); 48 48 49 private static final Class[] conArg = new Class[] { byte[].class };50 49 private static final double MIN_FACTOR = 0.20; 51 50 private static final double MAX_FACTOR = 5.0; … … 75 74 _datalen = len; 76 75 try { 77 _rvCon = rvClass.getConstructor( conArg);76 _rvCon = rvClass.getConstructor(byte[].class); 78 77 } catch (NoSuchMethodException e) { 79 78 throw new RuntimeException("SDSCache init error", e); -
core/java/src/net/i2p/util/PortMapper.java
r3411a7c r4e6ddfc 112 112 */ 113 113 public void renderStatusHTML(Writer out) throws IOException { 114 List<String> services = new ArrayList (_dir.keySet());114 List<String> services = new ArrayList<String>(_dir.keySet()); 115 115 out.write("<h2>Port Mapper</h2><table><tr><th>Service<th>Host<th>Port\n"); 116 116 Collections.sort(services); -
core/java/src/net/i2p/util/SimpleTimer2.java
r3411a7c r4e6ddfc 123 123 } 124 124 125 private ScheduledFuture schedule(TimedEvent t, long timeoutMs) {125 private ScheduledFuture<?> schedule(TimedEvent t, long timeoutMs) { 126 126 return _executor.schedule(t, timeoutMs, TimeUnit.MILLISECONDS); 127 127 } … … 249 249 private int _fuzz; 250 250 protected static final int DEFAULT_FUZZ = 3; 251 private ScheduledFuture _future; // _executor.remove() doesn't work so we have to use this251 private ScheduledFuture<?> _future; // _executor.remove() doesn't work so we have to use this 252 252 // ... and I expect cancelling this way is more efficient 253 253
Note: See TracChangeset
for help on using the changeset viewer.