Interface ClientTransport<S>

    • Method Detail

      • sendMessage

        PlatformMessage sendMessage​(PlatformMessage msg,
                                    S sender)
                             throws TransportException
        Synchronously send a message via the provided sender.
        Parameters:
        msg - the message to send.
        sender - the sender that was chosen based on the URI that the message must be sent to

        This method can block as long as is required to send the message including allowing time for the receiver to free up resources.

        Throws:
        TransportException
      • dispatchMessage

        void dispatchMessage​(PlatformMessage msg,
                             S sender)
                      throws TransportException
        Asynchronously send a message via the provided sender with no expected return.
        Parameters:
        msg - the message to send.
        sender - the sender that was chosen based on the URI that the message must be sent to
        Throws:
        TransportException
      • stopSender

        void stopSender​(S sender)
                 throws TransportException
        Stop/shutdown a sender and free up any associated resources. Called on Attivio shutdown.
        Throws:
        TransportException
      • getProtocol

        java.lang.String getProtocol()
        Get the String protocol that this transports implements.

        This will register this protocol with Attivio for message delivery.

        For example if this method returned "foo" then URI's of the form:

         foo://someUriSyntax:8000/goes?here
         
        would be processed using this transport. This must return a constant value and must return that value as soon as the object is constructed as the value is registered with the platform and can not be changed once registered.