|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.message.GarlicMessageBuilder
public class GarlicMessageBuilder
Build garlic messages based on a GarlicConfig
Constructor Summary | |
---|---|
GarlicMessageBuilder()
|
Method Summary | |
---|---|
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
int numTagsToDeliver,
int lowTagsThreshold,
SessionKeyManager skm)
called by netdb and above |
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
int numTagsToDeliver,
SessionKeyManager skm)
called by OCMJH |
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
PublicKey target,
SessionKey encryptKey,
SessionTag encryptTag)
used by TestJob and directly above and for encrypting DatabaseLookupMessages |
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
SessionKeyManager skm)
Now unused, since we have to generate a reply token first in OCMOSJ but we don't know if tags are required yet. |
(package private) static boolean |
needsTags(RouterContext ctx,
PublicKey key,
Hash local,
int minTagOverride)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GarlicMessageBuilder()
Method Detail |
---|
static boolean needsTags(RouterContext ctx, PublicKey key, Hash local, int minTagOverride)
local
- non-null; do not use this method for the router's SessionKeyManagerminTagOverride
- 0 for no override, > 0 to override SKM's settingspublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, SessionKeyManager skm)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- output parameter that will be filled with the sessionKey usedwrappedTags
- Output parameter that will be filled with the sessionTags used.
If non-empty on return you must call skm.tagsDelivered() when sent
and then call skm.tagsAcked() or skm.failTags() later.skm
- non-null
IllegalArgumentException
- on errorpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, int numTagsToDeliver, SessionKeyManager skm)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- output parameter that will be filled with the sessionKey usedwrappedTags
- Output parameter that will be filled with the sessionTags used.
If non-empty on return you must call skm.tagsDelivered() when sent
and then call skm.tagsAcked() or skm.failTags() later.numTagsToDeliver
- Only if the estimated available tags are below the threshold.
Set to zero to disable tag delivery. You must set to zero if you are not
equipped to confirm delivery and call skm.tagsAcked() or skm.failTags() later.skm
- non-null
IllegalArgumentException
- on errorpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, int numTagsToDeliver, int lowTagsThreshold, SessionKeyManager skm)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- output parameter that will be filled with the sessionKey usedwrappedTags
- Output parameter that will be filled with the sessionTags used.
If non-empty on return you must call skm.tagsDelivered() when sent
and then call skm.tagsAcked() or skm.failTags() later.numTagsToDeliver
- only if the estimated available tags are below the threshold.
Set to zero to disable tag delivery. You must set to zero if you are not
equipped to confirm delivery and call skm.tagsAcked() or failTags() later.
If this is always 0, it forces ElGamal every time.lowTagsThreshold
- the thresholdskm
- non-null
IllegalArgumentException
- on errorpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, PublicKey target, SessionKey encryptKey, SessionTag encryptTag)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- unused - why??wrappedTags
- New tags to be sent along with the message.
200 max enforced at receiver; null OKtarget
- public key of the location being garlic routed to (may be null if we
know the encryptKey and encryptTag)encryptKey
- sessionKey used to encrypt the current message, non-nullencryptTag
- sessionTag used to encrypt the current message, null to force ElG
IllegalArgumentException
- on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |