Interface HandlerInterface

All Superinterfaces:
ClientInterface, Remote
All Known Subinterfaces:
MonitorInterface
All Known Implementing Classes:
HandlerServer, MasterServer, MonitorServer

public interface HandlerInterface extends ClientInterface
The Interface HandlerInterface.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    deployHttpCertificate(byte[] pkcs12Bytes, String keystorePassword)
    Deploys a new PKCS#12 keystore to this handler's HTTPS server and reloads the certificate.
    default String
    Returns a JSON-encoded snapshot of the TLS certificate currently loaded by this handler's HTTPS server, or "{}" if no certificate is available.
    void
    handle(PluginEvent<?> event)
    Handle a single event.
    void
    handle(PluginEvent<?>[] events)
    Handle a list of events.
    default void
    Hot-reloads the TLS certificate from the keystore file currently on disk.

    Methods inherited from interface ClientInterface

    getPassword, getRoot, getService
  • Method Details

    • handle

      void handle(PluginEvent<?>[] events) throws RemoteException
      Handle a list of events.
      Parameters:
      events - the events
      Throws:
      RemoteException - the remote exception
    • handle

      void handle(PluginEvent<?> event) throws RemoteException
      Handle a single event.
      Parameters:
      event - the event
      Throws:
      RemoteException - the remote exception
    • getHttpCertificateJson

      default String getHttpCertificateJson() throws RemoteException
      Returns a JSON-encoded snapshot of the TLS certificate currently loaded by this handler's HTTPS server, or "{}" if no certificate is available.

      Note: this is intentionally a default method returning "{}". Java RMI's RemoteObjectInvocationHandler (Java 9+) invokes default interface methods locally on the caller JVM rather than forwarding the call to the remote object. The pre-compiled HandlerServer_Stub in ecaccess-stubs.jar was generated before this method existed and has no entry for it.

      Monitors running as MonitorServer instead of the legacy HandlerServer implement MonitorInterface, which re-declares this method as abstract. Since MonitorInterface has no pre-compiled stub, RMI uses a dynamic proxy that properly forwards the call to the remote MonitorServer. The default here preserves backward compatibility for legacy clients that still present a HandlerServer_Stub.

      Returns:
      JSON string; never null
      Throws:
      RemoteException - the remote exception
    • deployHttpCertificate

      default void deployHttpCertificate(byte[] pkcs12Bytes, String keystorePassword) throws RemoteException
      Deploys a new PKCS#12 keystore to this handler's HTTPS server and reloads the certificate.

      Note: this is intentionally a default no-op — see getHttpCertificateJson() for the rationale. Monitors running as MonitorServer override this method via MonitorInterface and receive the call over the direct RMI channel.

      Parameters:
      pkcs12Bytes - the PKCS#12 keystore bytes
      keystorePassword - password for the keystore and private key
      Throws:
      RemoteException - the remote exception
    • reloadHttpCertificate

      default void reloadHttpCertificate() throws RemoteException
      Hot-reloads the TLS certificate from the keystore file currently on disk. This is a default no-op; the actual reload is performed on MonitorServer via the abstract override in MonitorInterface.
      Throws:
      RemoteException - the remote exception