Package com.zeroc.Ice

Interface AsyncLoggerAdmin

All Superinterfaces:
Object

public interface AsyncLoggerAdmin extends Object
Provides remote access to the log messages of a communicator's logger. The Logger admin facet implements this interface. An Ice application attaches a RemoteLoggerPrx to receive these messages, or calls LoggerAdminPrx.getLog(com.zeroc.Ice.LogMessageType[], java.lang.String[], int) to retrieve the cached ones.

Remarks: The Slice compiler generated this skeleton interface from Slice interface ::Ice::LoggerAdmin.

  • Method Details

    • attachRemoteLoggerAsync

      CompletionStage<Void> attachRemoteLoggerAsync(RemoteLoggerPrx prx, LogMessageType[] messageTypes, String[] traceCategories, int messageMax, Current current) throws RemoteLoggerAlreadyAttachedException
      Attaches a RemoteLoggerPrx object to the local logger, then calls RemoteLoggerPrx.init(java.lang.String, com.zeroc.Ice.LogMessage[]) on prx. This facet detaches the remote logger when a call to it fails.
      Parameters:
      prx - A proxy to the remote logger.
      messageTypes - The list of message types that the remote logger wishes to receive. An empty list means no filtering (send all message types).
      traceCategories - The categories of traces that the remote logger wishes to receive. This parameter is ignored if messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace categories).
      messageMax - The maximum number of cached log messages (of all types) to be provided to RemoteLoggerPrx.init(java.lang.String, com.zeroc.Ice.LogMessage[]). A negative value requests all the cached messages, and 0 requests none. This parameter does not limit the log messages sent to RemoteLoggerPrx.log(com.zeroc.Ice.LogMessage).
      current - the Current object of the incoming request
      Returns:
      a completion stage that the servant will complete when the invocation completes
      Throws:
      RemoteLoggerAlreadyAttachedException - Thrown when a remote logger with the identity of prx is already attached to this facet.
    • detachRemoteLoggerAsync

      CompletionStage<Boolean> detachRemoteLoggerAsync(RemoteLoggerPrx prx, Current current)
      Detaches a RemoteLoggerPrx object from the local logger.
      Parameters:
      prx - A proxy to the remote logger. This facet uses only the identity of this proxy.
      current - the Current object of the incoming request
      Returns:
      true if a remote logger with this identity was attached and is now detached, and false otherwise.
    • getLogAsync

      CompletionStage<LoggerAdmin.GetLogResult> getLogAsync(LogMessageType[] messageTypes, String[] traceCategories, int messageMax, Current current)
      Retrieves the most recent log messages cached by this facet, oldest first. The properties Ice.Admin.Logger.KeepLogs and Ice.Admin.Logger.KeepTraces set how many log messages it caches.
      Parameters:
      messageTypes - The list of message types that the caller wishes to receive. An empty list means no filtering (send all message types).
      traceCategories - The categories of traces that the caller wishes to receive. This parameter is ignored if messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace categories).
      messageMax - The maximum number of log messages (of all types) to be returned. A negative value requests all the cached messages, and 0 requests none.
      current - the Current object of the incoming request
      Returns:
      a completion stage that the servant will complete with an instance of LoggerAdmin.GetLogResult
    • ice_staticId

      static String ice_staticId()
      Gets the type ID of the associated Slice interface.
      Returns:
      the string "::Ice::LoggerAdmin"
    • dispatch

      default CompletionStage<OutgoingResponse> dispatch(IncomingRequest request) throws UserException
      Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.
      Specified by:
      dispatch in interface Object
      Parameters:
      request - the incoming request
      Returns:
      the outgoing response
      Throws:
      UserException - if a UserException is thrown, Ice will marshal it as the response payload.