class GarlicConfig extends Object
| Modifier | Constructor and Description |
|---|---|
| GarlicConfig(Certificate cert,
long id,
long expiration,
DeliveryInstructions di)Creates a new GarlicConfig |
protected | GarlicConfig(List<GarlicConfig> cloveConfigs,
Certificate cert,
long id,
long expiration,
DeliveryInstructions di)Creates a new GarlicConfig with existing clove configs |
| Modifier and Type | Method and Description |
|---|---|
void | addClove(GarlicConfig config)Add a clove to the current message - if any cloves are added, an I2NP message
cannot be specified via setPayload. |
void | clearCloves()Clears all clove configs |
Certificate | getCertificate()Certificate for the getRecipient() to pay for their processing |
GarlicConfig | getClove(int index)Returns the clove at the specified index |
int | getCloveCount()Returns the number of clove configs |
DeliveryInstructions | getDeliveryInstructions()Specify how the I2NPMessage in the clove should be handled. |
long | getExpiration()Expiration of the clove, after which it should be dropped |
long | getId()Unique ID of the clove |
RouterInfo | getRecipient()Returns the recipient router |
PublicKey | getRecipientPublicKey()Returns the recipient's public key |
protected String | getSubData()Returns sub-data for toString |
void | setRecipient(RouterInfo info)Router to receive and process this clove - the router that will open the
delivery instructions and decide what to do process it locally as an I2NPMessage,
forward it as an I2NPMessage to a router, forward it as an I2NPMessage to a Destination,
or forward it as an I2NPMessage to a tunnel. |
void | setRecipientPublicKey(PublicKey recipientPublicKey)Public key of the router to receive and process this clove. |
String | toString() |
public GarlicConfig(Certificate cert, long id, long expiration, DeliveryInstructions di)
cert - the certificateid - the unique IDexpiration - the expiration timedi - the delivery instructionsprotected GarlicConfig(List<GarlicConfig> cloveConfigs, Certificate cert, long id, long expiration, DeliveryInstructions di)
cloveConfigs - the list of clove configscert - the certificateid - the unique IDexpiration - the expiration timedi - the delivery instructionspublic void addClove(GarlicConfig config)
config - the clove config to addpublic void clearCloves()
public Certificate getCertificate()
public GarlicConfig getClove(int index)
index - the indexpublic int getCloveCount()
public DeliveryInstructions getDeliveryInstructions()
public long getExpiration()
public long getId()
public RouterInfo getRecipient()
public PublicKey getRecipientPublicKey()
protected String getSubData()
public void setRecipient(RouterInfo info)
info - the recipient router infopublic void setRecipientPublicKey(PublicKey recipientPublicKey)
recipientPublicKey - the recipient's public key