net.i2p.router.message
Class PayloadGarlicConfig

java.lang.Object
  extended by net.i2p.router.message.GarlicConfig
      extended by net.i2p.router.message.PayloadGarlicConfig

public class PayloadGarlicConfig
extends GarlicConfig

Garlic config for a single clove, containing an I2NP message and no sub-cloves. It is used for individual cloves in a Garlic Message, and as the configuration for a single garlic-wrapped message by netdb MessageWrapper and tunnel TestJob.


Constructor Summary
PayloadGarlicConfig()
           
 
Method Summary
 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()
           
 GarlicConfig getClove(int index)
           
 int getCloveCount()
           
 I2NPMessage getPayload()
           
protected  String getSubData()
           
 void setPayload(I2NPMessage message)
          Specify the I2NP message to be sent - if this is set, no other cloves can be included in this block
 
Methods inherited from class net.i2p.router.message.GarlicConfig
getCertificate, getDeliveryInstructions, getExpiration, getId, getRecipient, getRecipientPublicKey, setCertificate, setDeliveryInstructions, setExpiration, setId, setRecipient, setRecipientPublicKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PayloadGarlicConfig

public PayloadGarlicConfig()
Method Detail

setPayload

public void setPayload(I2NPMessage message)
Specify the I2NP message to be sent - if this is set, no other cloves can be included in this block


getPayload

public I2NPMessage getPayload()

getSubData

protected String getSubData()
Overrides:
getSubData in class GarlicConfig

addClove

public void addClove(GarlicConfig config)
Description copied from class: GarlicConfig
Add a clove to the current message - if any cloves are added, an I2NP message cannot be specified via setPayload. This means that the resulting GarlicClove represented by this GarlicConfig must be a GarlicMessage itself

Overrides:
addClove in class GarlicConfig
Throws:
UnsupportedOperationException - always
Since:
0.9.12

getCloveCount

public int getCloveCount()
Overrides:
getCloveCount in class GarlicConfig
Returns:
zero
Since:
0.9.12

getClove

public GarlicConfig getClove(int index)
Overrides:
getClove in class GarlicConfig
Throws:
UnsupportedOperationException - always
Since:
0.9.12

clearCloves

public void clearCloves()
Overrides:
clearCloves in class GarlicConfig
Since:
0.9.12