ProtocolDescriptionSupport
, ProtocolFactory
CustomServerInternalProtocolFactory
@Generated(value="com.genesyslab.platform.commons.protocol.generator.Generator", date="2021-06-14T15:45:36.841-07:00") public class CustomServerProtocolFactory extends AbstractProtocolFactory
XmlMessageSerializer serializer = new XmlMessageSerializer(new CustomServerProtocolFactory());
// save message to file:
serializer.serialize(msg, new StreamResult(new FileWriter(filename)));
// restore message from file:
msg = serializer.deserialize(new StreamSource(new FileReader(filename)));
XmlMessageSerializer
ProtocolFactory.MessageVerificationReason, ProtocolFactory.MessageVerificationSupport
Modifier and Type | Field | Description |
---|---|---|
boolean |
enableProtocolUnknownMessageDelivery |
Flag to enable support of "protocol unknown" event messages.
It is enabled by default and can be switched off in case of backward compatibility issues. Disabling PSDK Customization option is PsdkCustomization.PsdkOption.DisableUnknownProtocolMessageDelivery . |
static ProtocolDescription |
PROTOCOL_DESCRIPTION |
Constructor | Description |
---|---|
CustomServerProtocolFactory() |
Modifier and Type | Method | Description |
---|---|---|
protected Message |
createEvent(int id) |
|
Message |
createMessage(int id) |
Creates protocol
Message by id. |
Message |
createMessage(int id,
java.lang.String name) |
Creates protocol
Message by id. |
protected Message |
createRequest(int id) |
|
protected java.lang.String |
getEventMessageName(int id) |
|
java.lang.Class<? extends Message> |
getMessageClass(java.lang.String messageName) |
|
java.lang.String |
getMessageName(int id) |
Returns message name by its id.
|
ProtocolDescription |
getProtocolDescription() |
Returns protocol description in format
<Category>.<Name> |
java.lang.String |
getProtocolVersion() |
Returns protocol version.
|
java.lang.String |
getReferenceAttributeName() |
Gets protocol's reference attribute name.
|
protected java.lang.String |
getRequestMessageName(int id) |
|
Message |
unknownProtocolMessage(int messageId) |
Creates unknown message with a specified message id.
|
getProtocolData, setProtocolData
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public boolean enableProtocolUnknownMessageDelivery
PsdkCustomization.PsdkOption.DisableUnknownProtocolMessageDelivery
.public ProtocolDescription getProtocolDescription()
ProtocolFactory
<Category>.<Name>
public java.lang.String getProtocolVersion()
ProtocolFactory
protected Message createRequest(int id)
protected Message createEvent(int id)
protected java.lang.String getEventMessageName(int id)
protected java.lang.String getRequestMessageName(int id)
public java.lang.Class<? extends Message> getMessageClass(java.lang.String messageName)
getMessageClass
in class AbstractProtocolFactory
public java.lang.String getMessageName(int id)
ProtocolFactory
id
- message idpublic Message createMessage(int id)
AbstractProtocolFactory
Message
by id.createMessage
in interface ProtocolFactory
createMessage
in class AbstractProtocolFactory
id
- id of the messageMessage
subclass for the specified idpublic Message createMessage(int id, java.lang.String name)
Message
by id.
It also may use message name to recognize request or event message type
to help with handling of messages with equal message ids (in some protocols).id
- id of the messagename
- name of the message or nullMessage
subclass for the specified idjava.lang.IllegalArgumentException
- if message with such id can't
be createdpublic Message unknownProtocolMessage(int messageId)
AbstractProtocolFactory
unknownProtocolMessage
in class AbstractProtocolFactory
public java.lang.String getReferenceAttributeName()
AbstractProtocolFactory
getReferenceAttributeName
in class AbstractProtocolFactory
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.