Interface TraceRmiServiceListener


public interface TraceRmiServiceListener
A listener for Trace RMI Service events
  • Method Details

    • serverStarted

      default void serverStarted(SocketAddress address)
      The server has been started on the given address
      Parameters:
      address - the server's address
    • serverStopped

      default void serverStopped()
      The server has been stopped
    • connected

      default void connected(TraceRmiConnection connection, TraceRmiServiceListener.ConnectMode mode, TraceRmiAcceptor acceptor)
      A new connection has been established
      Parameters:
      connection - the new connection
      mode - the mechanism creating the connection
      acceptor - if by TraceRmiService.acceptOne(SocketAddress), the acceptor that created this connection
    • disconnected

      default void disconnected(TraceRmiConnection connection)
      A connection was lost or closed

      TODO: Do we care to indicate why?

      Parameters:
      connection - the connection that has been closed
    • waitingAccept

      default void waitingAccept(TraceRmiAcceptor acceptor)
      The service is waiting for an inbound connection

      The acceptor remains valid until one of three events occurs: connected(TraceRmiConnection, ConnectMode, TraceRmiAcceptor), acceptCancelled(TraceRmiAcceptor), or acceptFailed(TraceRmiAcceptor, Exception).

      Parameters:
      acceptor - the acceptor waiting
    • acceptCancelled

      default void acceptCancelled(TraceRmiAcceptor acceptor)
      The client cancelled an inbound acceptor via TraceRmiAcceptor.cancel()
      Parameters:
      acceptor - the acceptor that was cancelled
    • acceptFailed

      default void acceptFailed(TraceRmiAcceptor acceptor, Exception e)
      The service failed to complete an inbound connection
      Parameters:
      acceptor - the acceptor that failed
      e - the exception causing the failure
    • targetPublished

      default void targetPublished(TraceRmiConnection connection, Target target)
      A new target was created by a Trace RMI connection

      The added benefit of this method compared to the TargetPublicationListener is that it identifies which connection

      Parameters:
      connection - the connection creating the target
      target - the target
      See Also:
    • transactionOpened

      default void transactionOpened(TraceRmiConnection connection, Target target)
      A transaction was opened for the given target

      Note, this is different than listening for transactions on the Trace domain object, because this only includes those initiated by the connection.

      Parameters:
      connection - the connection that initiated the transaction
      target - the target whose trace is to be modified
    • transactionClosed

      default void transactionClosed(TraceRmiConnection connection, Target target, boolean aborted)
      A transaction was closed for the given target

      Note, this is different than listening for transactions on the Trace domain object, because this only includes those initiated by the connection.

      Parameters:
      connection - the connection that closed the transaction
      target - the target whose trace was modified
      aborted - if the transaction was aborted. This should only be true in catastrophic cases.