Class HandlerServer

All Implemented Interfaces:
ClientInterface, HandlerInterface, RemoteServer, MBeanListener, MBeanService, ToBeStarted, Serializable, Remote

public final class HandlerServer extends StarterServer implements HandlerInterface
The Class HandlerServer.
See Also:
  • Constructor Details

  • Method Details

    • getRoot

      public String getRoot()
      Gets the root. Gets the root.
      Specified by:
      getRoot in interface ClientInterface
      Returns:
      the root
    • getPassword

      public String getPassword()
      Gets the password. Gets the password.
      Specified by:
      getPassword in interface ClientInterface
      Returns:
      the password
    • getVersion

      public String getVersion()
      Gets the version. Gets the version.
      Specified by:
      getVersion in class StarterServer
      Returns:
      the version
    • getService

      public String getService()
      Gets the service. Gets the service.
      Specified by:
      getService in interface ClientInterface
      Returns:
      the service
    • getHttpCertificateJson

      public 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 a JSON-encoded snapshot of the TLS certificate currently loaded by this handler's HTTPS server. Delegates to the http plugin via the HttpCertificateProvider interface. Returns "{}" if the plugin is not available or does not implement the interface.

      Specified by:
      getHttpCertificateJson in interface HandlerInterface
      Returns:
      JSON string; never null
      Throws:
      RemoteException - the remote exception
    • deployHttpCertificate

      public 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 HandlerInterface.getHttpCertificateJson() for the rationale. Monitors running as MonitorServer override this method via MonitorInterface and receive the call over the direct RMI channel. Deploys a new PKCS#12 keystore to this handler's HTTPS server. Delegates to the http plugin via the HttpCertificateProvider interface. No-op if the plugin is not available or does not implement the interface.

      Specified by:
      deployHttpCertificate in interface HandlerInterface
      Parameters:
      pkcs12Bytes - the PKCS#12 keystore bytes
      keystorePassword - password for the keystore and private key
      Throws:
      RemoteException - the remote exception