finals, javadoc fixes

This commit is contained in:
zzz
2013-06-05 16:36:23 +00:00
parent 9386270b57
commit 000ca7c7b7
2 changed files with 10 additions and 10 deletions

View File

@ -22,15 +22,15 @@ import net.i2p.data.Hash;
import net.i2p.data.TunnelId; import net.i2p.data.TunnelId;
/** /**
* Defines the message a client sends to a router when destroying * Defines the message a router sends to a client to request that
* existing session. * a leaseset be created and signed. The reply is a CreateLeaseSetMessage.
* *
* @author jrandom * @author jrandom
*/ */
public class RequestLeaseSetMessage extends I2CPMessageImpl { public class RequestLeaseSetMessage extends I2CPMessageImpl {
public final static int MESSAGE_TYPE = 21; public final static int MESSAGE_TYPE = 21;
private SessionId _sessionId; private SessionId _sessionId;
private List<TunnelEndpoint> _endpoints; private final List<TunnelEndpoint> _endpoints;
private Date _end; private Date _end;
public RequestLeaseSetMessage() { public RequestLeaseSetMessage() {
@ -101,9 +101,9 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl {
@Override @Override
protected byte[] doWriteMessage() throws I2CPMessageException, IOException { protected byte[] doWriteMessage() throws I2CPMessageException, IOException {
if ((_sessionId == null) || (_endpoints == null)) if (_sessionId == null)
throw new I2CPMessageException("Unable to write out the message as there is not enough data"); throw new I2CPMessageException("Unable to write out the message as there is not enough data");
ByteArrayOutputStream os = new ByteArrayOutputStream(64); ByteArrayOutputStream os = new ByteArrayOutputStream(256);
try { try {
_sessionId.writeBytes(os); _sessionId.writeBytes(os);
DataHelper.writeLong(os, 1, _endpoints.size()); DataHelper.writeLong(os, 1, _endpoints.size());
@ -127,7 +127,7 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl {
@Override @Override
public String toString() { public String toString() {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
buf.append("[RequestLeaseMessage: "); buf.append("[RequestLeaseSetMessage: ");
buf.append("\n\tSessionId: ").append(getSessionId()); buf.append("\n\tSessionId: ").append(getSessionId());
buf.append("\n\tTunnels:"); buf.append("\n\tTunnels:");
for (int i = 0; i < getEndpoints(); i++) { for (int i = 0; i < getEndpoints(); i++) {
@ -140,8 +140,8 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl {
} }
private static class TunnelEndpoint { private static class TunnelEndpoint {
private Hash _router; private final Hash _router;
private TunnelId _tunnelId; private final TunnelId _tunnelId;
public TunnelEndpoint(Hash router, TunnelId id) { public TunnelEndpoint(Hash router, TunnelId id) {
_router = router; _router = router;

View File

@ -17,8 +17,8 @@ import net.i2p.data.DataFormatException;
import net.i2p.data.DataHelper; import net.i2p.data.DataHelper;
/** /**
* Defines the message a client sends to a router when destroying * Defines the message a router sends to a client indicating the
* existing session. * status of the session.
* *
* @author jrandom * @author jrandom
*/ */