|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
net.i2p.data.i2cp.SessionConfig
public class SessionConfig
Defines the information a client must provide to create a session
Constructor Summary | |
---|---|
SessionConfig()
|
|
SessionConfig(Destination dest)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
|
java.util.Date |
getCreationDate()
Determine when this session was authorized by the destination (so we can prevent replay attacks) |
Destination |
getDestination()
Retrieve the destination for which this session is supposed to connect |
java.util.Properties |
getOptions()
Retrieve any configuration options for the session |
Signature |
getSignature()
|
void |
readBytes(java.io.InputStream rawConfig)
Load up the current object with data from the given stream. |
void |
setCreationDate(java.util.Date date)
|
void |
setOptions(java.util.Properties options)
Configure the session with the given options |
void |
setSignature(Signature sig)
|
void |
signSessionConfig(SigningPrivateKey signingKey)
Sign the structure using the supplied private key |
boolean |
tooOld()
|
java.lang.String |
toString()
|
boolean |
verifySignature()
Verify that the signature matches the destination's signing public key. |
void |
writeBytes(java.io.OutputStream out)
Write out the data structure to the stream, using the format defined in the I2P data structure specification. |
Methods inherited from class net.i2p.data.DataStructureImpl |
---|
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SessionConfig()
public SessionConfig(Destination dest)
Method Detail |
---|
public Destination getDestination()
public java.util.Date getCreationDate()
public void setCreationDate(java.util.Date date)
public java.util.Properties getOptions()
public void setOptions(java.util.Properties options)
public Signature getSignature()
public void setSignature(Signature sig)
public void signSessionConfig(SigningPrivateKey signingKey) throws DataFormatException
DataFormatException
public boolean verifySignature()
public boolean tooOld()
public void readBytes(java.io.InputStream rawConfig) throws DataFormatException, java.io.IOException
DataStructure
rawConfig
- stream to read from
DataFormatException
- if the data is improperly formatted
java.io.IOException
- if there was a problem reading the streampublic void writeBytes(java.io.OutputStream out) throws DataFormatException, java.io.IOException
DataStructure
out
- stream to write to
DataFormatException
- if the data was incomplete or not yet ready to be written
java.io.IOException
- if there was a problem writing to the streampublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |