Package org.stellar.sdk.xdr
Class ContractEvent
java.lang.Object
org.stellar.sdk.xdr.ContractEvent
- All Implemented Interfaces:
XdrElement
ContractEvent's original definition in the XDR file is:
struct ContractEvent
{
// We can use this to add more fields, or because it
// is first, to change ContractEvent into a union.
ExtensionPoint ext;
ContractID* contractID;
ContractEventType type;
union switch (int v)
{
case 0:
struct
{
SCVal topics<>;
SCVal data;
} v0;
}
body;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContractEventBody's original definition in the XDR file is:static class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionContractEvent(ExtensionPoint ext, ContractID contractID, ContractEventType type, ContractEvent.ContractEventBody body) Creates a newContractEventinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ContractEventdecode(XdrDataInputStream stream) static ContractEventdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ContractEventstatic ContractEventfromXdrBase64(String xdr) static ContractEventfromXdrByteArray(byte[] xdr) getBody()Value of thebodyfield.Value of thecontractIDfield.getExt()Value of theextfield.getType()Value of thetypefield.inthashCode()voidValue of thebodyfield.voidsetContractID(ContractID contractID) Value of thecontractIDfield.voidsetExt(ExtensionPoint ext) Value of theextfield.voidsetType(ContractEventType type) Value of thetypefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ContractEvent
public ContractEvent() -
ContractEvent
public ContractEvent(ExtensionPoint ext, ContractID contractID, ContractEventType type, ContractEvent.ContractEventBody body) Creates a newContractEventinstance.- Parameters:
ext- theextfield valuecontractID- thecontractIDfield valuetype- thetypefield valuebody- thebodyfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
getContractID
Value of thecontractIDfield.- Returns:
- the
contractIDfield value
-
getType
Value of thetypefield.- Returns:
- the
typefield value
-
getBody
Value of thebodyfield.- Returns:
- the
bodyfield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
setContractID
Value of thecontractIDfield.- Parameters:
contractID- thecontractIDfield value
-
setType
Value of thetypefield.- Parameters:
type- thetypefield value
-
setBody
Value of thebodyfield.- Parameters:
body- thebodyfield value
-
equals
-
hashCode
public int hashCode() -
toString
-