|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.AbstractProtocolFactory
com.genesyslab.platform.outbound.protocol.outboundserver.OutboundServerProtocolFactory
public class OutboundServerProtocolFactory
OutboundServer protocol specific messages factory.
It is internally used by the OutboundServer protocol for messages transportation.
XmlMessageSerializer serializer = new XmlMessageSerializer(new OutboundServerProtocolFactory());
// 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
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.genesyslab.platform.commons.protocol.ProtocolFactory |
---|
ProtocolFactory.MessageVerificationReason, ProtocolFactory.MessageVerificationSupport |
Field Summary | |
---|---|
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 Summary | |
---|---|
OutboundServerProtocolFactory()
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractProtocolFactory |
---|
getProtocolData, setProtocolData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public boolean enableProtocolUnknownMessageDelivery
PsdkCustomization.PsdkOption.DisableUnknownProtocolMessageDelivery
.
Constructor Detail |
---|
public OutboundServerProtocolFactory()
Method Detail |
---|
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 id
public Message createMessage(int id)
AbstractProtocolFactory
Message
by id.
createMessage
in interface ProtocolFactory
createMessage
in class AbstractProtocolFactory
id
- id of the message
Message
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 null
Message
subclass for the specified id
java.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
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |