ILogEnabled
, com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
public class ActionsMaskCodec extends AbstractLogEnabled implements com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
Constructor | Description |
---|---|
ActionsMaskCodec() |
Modifier and Type | Method | Description |
---|---|---|
void |
appendLogValue(java.lang.StringBuffer buf,
java.lang.Object customTypeObject,
boolean truncate,
boolean hide) |
Appends value of the custom-type object to the buffer.
|
static ActionsMask |
create(java.lang.String type) |
Creates actions mask instance by type name.
|
java.lang.Object |
decodeFromXml(javax.xml.transform.Source attributeElement,
AttributeDescription ai) |
Deserializes custom-type object from xml representation.
|
java.lang.Object |
encodeForConnection(java.lang.Object customTypeObject,
java.lang.String id,
MessageTransport transport,
java.lang.Object transportState) |
Serializes custom-type object to the form, that can be accepted
by connection.
|
void |
encodeToXml(java.lang.Object customTypeObject,
javax.xml.transform.Result attributeElement) |
Serializes custom-type object to xml.
|
java.lang.String |
getLogType() |
Returns type signature for attribute record written to log.
|
java.lang.String |
getNS() |
Returns Xml namespace of custom type or null
if namespace is default for protocol.
|
static java.lang.String |
getType(java.lang.Class<? extends ActionsMask> typeClass) |
Gets type name for a specified actions mask class.
|
void |
setMessage(Message message) |
Sets message this codec works on.
|
void |
setProtocolData(java.lang.Object protocolData) |
Sets additional protocol specific data for this codec.
|
enableLogging, getLogger, onEnableLogging
public java.lang.String getNS()
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
getNS
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
public void setProtocolData(java.lang.Object protocolData)
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
It is highly recommended to implement the protocolData object
as set of interfaces that in turn provide access to codec specific
data. Do not use protocolData as an object for a single codec,
since it will be impossible to extend such object.
Wrong: CodecData data = (CodecData) protocolData;
Right: CodecData data =
((CodecDataHolder) protocolData).getCodecData();
setProtocolData
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
protocolData
- protocol specific datapublic void setMessage(Message message)
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
setMessage
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
message
- protocol specific datapublic java.lang.Object encodeForConnection(java.lang.Object customTypeObject, java.lang.String id, MessageTransport transport, java.lang.Object transportState) throws PlatformException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
encodeForConnection
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
customTypeObject
- object to serializeid
- attribute idtransport
- message transporttransportState
- state of the transportPlatformException
- if some problems occurredpublic void encodeToXml(java.lang.Object customTypeObject, javax.xml.transform.Result attributeElement) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
encodeToXml
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
customTypeObject
- object to serializeattributeElement
- xml attribute to store the data incom.genesyslab.platform.commons.protocol.runtime.codec.CodecException
- if some codec problems occurredpublic java.lang.Object decodeFromXml(javax.xml.transform.Source attributeElement, AttributeDescription ai) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
decodeFromXml
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
attributeElement
- xml attribute to restore the data fromai
- attribute description objectcom.genesyslab.platform.commons.protocol.runtime.codec.CodecException
- if there is problems with xml datapublic java.lang.String getLogType()
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
LogTypes
class to return standard values.getLogType
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
public void appendLogValue(java.lang.StringBuffer buf, java.lang.Object customTypeObject, boolean truncate, boolean hide)
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
appendLogValue
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
buf
- buffer to append datacustomTypeObject
- value of custom-type objecttruncate
- whether long value should be truncatedhide
- whether value should be hiddenpublic static ActionsMask create(java.lang.String type)
type
- actions mask class name.public static java.lang.String getType(java.lang.Class<? extends ActionsMask> typeClass)
typeClass
- actions mask class.Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.