Class FormModel.ServerExchange

  • Enclosing class:
    FormModel

    public abstract static class FormModel.ServerExchange
    extends java.lang.Object
    Provides a mechanism for FormModel to execute an event on a server.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerExchange()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void remerge()
      Allows this implementation to react to the changed data after the FormModel has loaded the data from the response.
      abstract byte[] sendToServer​(byte[] request)
      Sends a request to the server and returns the server's response.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerExchange

        public ServerExchange()
    • Method Detail

      • remerge

        public void remerge()
        Allows this implementation to react to the changed data after the FormModel has loaded the data from the response. This is called as the last step after data has been successfully exchanged with the server. The default implementation does nothing.
      • sendToServer

        public abstract byte[] sendToServer​(byte[] request)
        Sends a request to the server and returns the server's response. The derived class must implement the transfer mechanism. The contents in each direction are formatted as UTF-8 encoded XDP data. The request includes the DataModel contents, as well as an execEvent packet (with context and activity attributes) that describe the event to be executed on the server.
        Parameters:
        request - a buffer containing the data to be sent in the server request.
        Returns:
        a buffer containing the server response, this is expected to be UTF-8 encoded XDP data.