Class OSIPSerializer<T extends Payload>

java.lang.Object
org.openwms.common.comm.osip.OSIPSerializer<T>
Direct Known Subclasses:
ErrorMessageSerializer, ResponseMessageSerializer, TimesyncResponseSerializer

public abstract class OSIPSerializer<T extends Payload> extends Object
A OSIPSerializer is able to serialize OSIP messages into Strings that can be sent over the wire. see https://interface21-io.gitbook.io/osip/
Author:
Heiko Scherrer
  • Field Details

    • driver

      private final org.openwms.common.comm.config.Osip driver
  • Constructor Details

    • OSIPSerializer

      protected OSIPSerializer(org.openwms.common.comm.config.Osip driver)
  • Method Details

    • getMessageIdentifier

      public abstract String getMessageIdentifier()
      Subclasses have to return an unique, case-sensitive message identifier.
      Returns:
      The message TYPE field (see OSIP specification)
    • serialize

      public String serialize(T obj)
      Serialize the given object obj into a String.
      Parameters:
      obj - The message object to serialize
      Returns:
      The telegram String
    • convert

      protected abstract String convert(T message)
    • getDriver

      protected org.openwms.common.comm.config.Osip getDriver()