public class LNDLightningHandlerContext extends JSONParsable implements LightningHandlerContext
Modifier and Type | Field and Description |
---|---|
protected java.lang.Long |
addIndex |
static java.lang.String |
CONTEXT_TYPE |
protected java.lang.Long |
settleIndex |
Constructor and Description |
---|
LNDLightningHandlerContext()
Empty constructor
|
LNDLightningHandlerContext(javax.json.JsonObject jsonObject)
Constructo for parsing json data.
|
LNDLightningHandlerContext(java.lang.Long addIndex,
java.lang.Long settleIndex)
Default constructor setting the current indicies.
|
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
java.lang.Long |
getAddIndex() |
java.lang.Long |
getSettleIndex() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setAddIndex(java.lang.Long addIndex) |
void |
setSettleIndex(java.lang.Long settleIndex) |
add, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
parseContext
public static final java.lang.String CONTEXT_TYPE
protected java.lang.Long addIndex
protected java.lang.Long settleIndex
public LNDLightningHandlerContext()
public LNDLightningHandlerContext(java.lang.Long addIndex, java.lang.Long settleIndex)
addIndex
- the last index checkpoint from payment handler for added invoices. Null for latest only.settleIndex
- the last index checkpoint from payment handler for settled invoices. Null for latest only.public LNDLightningHandlerContext(javax.json.JsonObject jsonObject)
jsonObject
- the context json object.public java.lang.Long getAddIndex()
public void setAddIndex(java.lang.Long addIndex)
addIndex
- the last index checkpoint from payment handler for added invoices. Null for latest only.public java.lang.Long getSettleIndex()
public void setSettleIndex(java.lang.Long settleIndex)
settleIndex
- the last index checkpoint from payment handler for settled invoices. Null for latest only.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class JSONParsable
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject jsonObject) throws javax.json.JsonException
parseJson
in class JSONParsable
jsonObject
- the json object to read key and values from and set object properties.javax.json.JsonException
- if problems occurred converting object from JSON.