Package net.i2p.client
Class SendMessageOptions
- java.lang.Object
-
- net.i2p.data.DataStructureImpl
-
- net.i2p.data.DateAndFlags
-
- net.i2p.client.SendMessageOptions
-
- All Implemented Interfaces:
Serializable,DataStructure
public class SendMessageOptions extends DateAndFlags
Advanced options attached to a single outgoing I2CP message. Note that the packing of options into the 16-bit flags field is is subject to change. Therefore, for now, this is only recommended within RouterContext. Static methods are for OutboundClientMessageOneShotJob to decode the flags field on the router side. GzipOption flags are as of 0.9.36, are client-side only, and are not included in the flags field or sent to the router.- Since:
- 0.9.2
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSendMessageOptions.GzipOptionOverrides i2cp.gzip session option and size threshold for this message only.static classSendMessageOptions.ReliabilityReliability bits 9-10
-
Field Summary
-
Fields inherited from class net.i2p.data.DateAndFlags
_flags
-
-
Constructor Summary
Constructors Constructor Description SendMessageOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SendMessageOptions.GzipOptiongetGzip()Overrides i2cp.gzip session option and size threshold for this message only.SendMessageOptions.ReliabilitygetReliability()default Reliability.DEFAULTstatic SendMessageOptions.ReliabilitygetReliability(int flags)default Reliability.DEFAULTbooleangetSendLeaseSet()default truestatic booleangetSendLeaseSet(int flags)default trueintgetTagsToSend()If we are low on tags, send this many.static intgetTagsToSend(int flags)If we are low on tags, send this many.intgetTagThreshold()Low tag threshold.static intgetTagThreshold(int flags)Low tag threshold.voidsetGzip(boolean yes)Overrides i2cp.gzip session option and size threshold for this message only.voidsetReliability(SendMessageOptions.Reliability r)default Reliability.DEFAULTvoidsetSendLeaseSet(boolean yes)default truevoidsetTagsToSend(int tags)If we are low on tags, send this many.voidsetTagThreshold(int tags)Low tag threshold.-
Methods inherited from class net.i2p.data.DateAndFlags
equals, fromByteArray, getDate, getFlags, getTime, hashCode, readBytes, setDate, setDate, setFlags, toByteArray, toString, writeBytes
-
Methods inherited from class net.i2p.data.DataStructureImpl
calculateHash, fromBase64, read, toBase64
-
-
-
-
Method Detail
-
setSendLeaseSet
public void setSendLeaseSet(boolean yes)
default true
-
getSendLeaseSet
public boolean getSendLeaseSet()
default true
-
getSendLeaseSet
public static boolean getSendLeaseSet(int flags)
default true
-
setTagsToSend
public void setTagsToSend(int tags)
If we are low on tags, send this many. Power of 2 recommended - rounds down. default 0, meaning unset, use the SKM config (default 40)- Parameters:
tags- 0 or 2 to 128
-
getTagsToSend
public int getTagsToSend()
If we are low on tags, send this many.- Returns:
- default 0, meaning unset, use the SKM config (default 40)
-
getTagsToSend
public static int getTagsToSend(int flags)
If we are low on tags, send this many.- Returns:
- default 0, meaning unset, use the SKM config (default 40)
-
setTagThreshold
public void setTagThreshold(int tags)
Low tag threshold. If less than this many, send more. Power of 2 recommended - rounds down. default 0, meaning unset, use the SKM config (default 30)- Parameters:
tags- 0 to 90
-
getTagThreshold
public int getTagThreshold()
Low tag threshold. If less than this many, send more.- Returns:
- default 0, meaning unset, use the SKM config (default 30)
-
getTagThreshold
public static int getTagThreshold(int flags)
Low tag threshold. If less than this many, send more.- Returns:
- default 0, meaning unset, use the SKM config (default 30)
-
setReliability
public void setReliability(SendMessageOptions.Reliability r)
default Reliability.DEFAULT- Since:
- 0.9.14
-
getReliability
public SendMessageOptions.Reliability getReliability()
default Reliability.DEFAULT- Since:
- 0.9.14
-
getReliability
public static SendMessageOptions.Reliability getReliability(int flags)
default Reliability.DEFAULT- Since:
- 0.9.14
-
getGzip
public SendMessageOptions.GzipOption getGzip()
Overrides i2cp.gzip session option and size threshold for this message only.- Returns:
- non-null, DEFAULT unless setGzip() was called
- Since:
- 0.9.36
-
setGzip
public void setGzip(boolean yes)
Overrides i2cp.gzip session option and size threshold for this message only.- Since:
- 0.9.36
-
-