|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.builtintypes.ExtensionObject
public class ExtensionObject
Extension object contains a Structure which is either
XML or binary encoded.
| Constructor Summary | |
|---|---|
ExtensionObject(ExpandedNodeId typeId)
Constructor for ExtensionObject. |
|
ExtensionObject(ExpandedNodeId typeId,
byte[] object)
Constructor for ExtensionObject. |
|
ExtensionObject(ExpandedNodeId typeId,
XmlElement object)
Constructor for ExtensionObject. |
|
ExtensionObject(Structure encodeable)
ExtensionObject that encodes the value later when put into a Encoder. |
|
| Method Summary | ||
|---|---|---|
static ExtensionObject |
binaryEncode(Structure encodeable,
EncoderContext ctx)
Create extension object by encoding an encodeable to a binary format using the default serializer. |
|
static ExtensionObject |
binaryEncode(Structure encodeable,
IEncodeableSerializer serializer,
EncoderContext ctx)
Create extension object by encoding an encodeable to a binary format |
|
|
decode(EncoderContext ctx)
Attempts to decode the extension object using the default serializer of the stack. |
|
|
decode(EncoderContext ctx,
NamespaceTable namespaceTable)
decode. |
|
|
decode(IEncodeableSerializer serializer,
EncoderContext ctx,
NamespaceTable namespaceTable)
Decode the extension object |
|
static ExtensionObject |
encode(Structure encodeable,
QualifiedName encodingType,
EncoderContext ctx)
Create extension object by encoding an encodeable to the defined encoding using the default serializer. |
|
static ExtensionObject |
encode(Structure encodeable,
QualifiedName encodingType,
IEncodeableSerializer serializer,
EncoderContext ctx)
Create extension object by encoding an encodeable to the defined encoding using the default serializer. |
|
boolean |
equals(Object obj)
|
|
EncodeType |
getEncodeType()
Getter for the field encodeType. |
|
Object |
getObject()
Getter for the field object. |
|
ExpandedNodeId |
getTypeId()
Getter for the field typeId. |
|
int |
hashCode()
|
|
boolean |
isEncoded()
Returns true, if the getObject() is encoded value. |
|
static ExtensionObject |
xmlEncode(Structure encodeable)
Create extension object by encoding an encodeable to xml format using the default serializer |
|
static ExtensionObject |
xmlEncode(Structure encodeable,
IEncodeableSerializer serializer)
Create extension object by encoding an encodeable to xml format |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtensionObject(ExpandedNodeId typeId)
Constructor for ExtensionObject.
typeId - a ExpandedNodeId object.
public ExtensionObject(ExpandedNodeId typeId,
byte[] object)
Constructor for ExtensionObject.
typeId - a ExpandedNodeId object.object - an array of byte.
public ExtensionObject(ExpandedNodeId typeId,
XmlElement object)
Constructor for ExtensionObject.
typeId - a ExpandedNodeId object.object - a XmlElement object.public ExtensionObject(Structure encodeable)
encodeable - a Structure that should later be encoded.| Method Detail |
|---|
public static ExtensionObject encode(Structure encodeable,
QualifiedName encodingType,
IEncodeableSerializer serializer,
EncoderContext ctx)
throws EncodingException
encodeable - the objects to encodeencodingType - the requested encoding type either QualifiedName.DEFAULT_BINARY_ENCODING or QualifiedName.DEFAULT_XML_ENCODINGserializer - the serializer to use (default is StackUtils.getDefaultSerializer())ctx - a EncoderContext object.
EncodingException - if the encodingType is unsupported or the encoding fails
public static ExtensionObject encode(Structure encodeable,
QualifiedName encodingType,
EncoderContext ctx)
throws EncodingException
the default serializer.
encodeable - the objects to encodeencodingType - the requested encoding type either QualifiedName.DEFAULT_BINARY_ENCODING or QualifiedName.DEFAULT_XML_ENCODINGctx - a EncoderContext object.
EncodingException - if the encodingType is unsupported or the encoding fails
public static ExtensionObject binaryEncode(Structure encodeable,
EncoderContext ctx)
throws EncodingException
encodeable - encodeablectx - a EncoderContext object.
EncodingException - on encoding problem
public static ExtensionObject binaryEncode(Structure encodeable,
IEncodeableSerializer serializer,
EncoderContext ctx)
throws EncodingException
encodeable - encodeableserializer - serializerctx - a EncoderContext object.
EncodingException - on encoding problem
public static ExtensionObject xmlEncode(Structure encodeable)
throws EncodingException
encodeable - encodeable
EncodingException - on encoding problem. Currently always, since the encoding is not supported.
public static ExtensionObject xmlEncode(Structure encodeable,
IEncodeableSerializer serializer)
throws EncodingException
encodeable - encodeableserializer - serializer
EncodingException - on encoding problem. Currently always, since the encoding is not supported.public EncodeType getEncodeType()
Getter for the field encodeType.
EncodeType object.public Object getObject()
Getter for the field object.
Object object.public ExpandedNodeId getTypeId()
Getter for the field typeId.
ExpandedNodeId object.
public <T extends IEncodeable> T decode(IEncodeableSerializer serializer,
EncoderContext ctx,
NamespaceTable namespaceTable)
throws DecodingException
T - typeserializer - serializer to usectx - contextnamespaceTable - namespace table
DecodingException - if any.
public <T extends IEncodeable> T decode(EncoderContext ctx)
throws DecodingException
T - typectx - context
DecodingException - if any.
public <T extends IEncodeable> T decode(EncoderContext ctx,
NamespaceTable namespaceTable)
throws DecodingException
decode.
T - a T object.ctx - contextnamespaceTable - a NamespaceTable object.
DecodingException - if any.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic boolean isEncoded()
getObject() is encoded value. Null is considered to be encoded value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||