Class BaseConnection

    • Field Detail

      • logger

        protected org.slf4j.Logger logger
      • messageId

        protected long messageId
    • Constructor Detail

      • BaseConnection

        protected BaseConnection()
        Default constructor that initializes logging and a single threaded EventManager.
    • Method Detail

      • sendMessage

        public Object sendMessage​(org.apache.cayenne.remote.ClientMessage message)
                           throws CayenneRuntimeException
        Invokes 'beforeSendMessage' on self, then invokes 'doSendMessage'. Implements basic logging functionality. Do not override this method unless absolutely necessary. Override 'beforeSendMessage' and 'doSendMessage' instead.
        Specified by:
        sendMessage in interface ClientConnection
        Throws:
        CayenneRuntimeException
      • getProcessedMessagesCount

        public long getProcessedMessagesCount()
        Returns a count of processed messages since the beginning of life of this connector.
      • beforeSendMessage

        protected abstract void beforeSendMessage​(org.apache.cayenne.remote.ClientMessage message)
                                           throws CayenneRuntimeException
        Called before logging the beginning of message processing.
        Throws:
        CayenneRuntimeException