Interface MonitorInterface
- All Superinterfaces:
ClientInterface, HandlerInterface, Remote
- All Known Implementing Classes:
MonitorServer
Extends HandlerInterface with direct RMI-callable certificate operations for ECpds Monitor daemons.
HandlerInterface.getHttpCertificateJson() and HandlerInterface.deployHttpCertificate(byte[], String) are declared
default (no-op) in HandlerInterface because the pre-compiled HandlerServer_Stub in the
parallel ECaccess-J project has no entry for those methods — Java 9+ RMI would invoke them locally on the
caller JVM rather than forwarding to the remote.
MonitorInterface is defined inside open-ecpds, so no pre-compiled stub exists for it. Java RMI uses a dynamic
proxy (RemoteObjectInvocationHandler) for any remote object exported under this interface, and a dynamic
proxy forwards non-default abstract methods to the remote correctly. By re-declaring getHttpCertificateJson()
and deployHttpCertificate() as abstract here, the master can call them via an ordinary RMI round-trip
to the MonitorServer running on the monitor host.
Monitors must be started with -Decmwf.common.starter.name=ecmwf.ecpds.monitor.MonitorServer instead of the
legacy ecmwf.common.ecaccess.HandlerServer.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeployHttpCertificate(byte[] pkcs12Bytes, String keystorePassword) Deploys a new PKCS#12 keystore to this monitor's HTTPS server and reloads the certificate.Returns a JSON-encoded snapshot of the TLS certificate currently loaded by this monitor's HTTPS server.voidHot-reloads the TLS certificate from the keystore file currently on disk on the remote Monitor.Methods inherited from interface ClientInterface
getPassword, getRoot, getServiceMethods inherited from interface HandlerInterface
handle, handle
-
Method Details
-
getHttpCertificateJson
Returns a JSON-encoded snapshot of the TLS certificate currently loaded by this monitor's HTTPS server.This method re-declares the
defaultmethod fromHandlerInterfaceasabstractso that Java RMI's dynamic proxy forwards the call to the remoteMonitorServerrather than executing it locally.- Specified by:
getHttpCertificateJsonin interfaceHandlerInterface- Returns:
- JSON string; never
null - Throws:
RemoteException- the remote exception
-
deployHttpCertificate
Deploys a new PKCS#12 keystore to this monitor's HTTPS server and reloads the certificate.This method re-declares the
defaultno-op fromHandlerInterfaceasabstractso that Java RMI's dynamic proxy forwards the call to the remoteMonitorServer.- Specified by:
deployHttpCertificatein interfaceHandlerInterface- Parameters:
pkcs12Bytes- the PKCS#12 keystore byteskeystorePassword- password for the keystore and private key- Throws:
RemoteException- the remote exception
-
reloadHttpCertificate
Hot-reloads the TLS certificate from the keystore file currently on disk on the remote Monitor. Re-declares thedefaultno-op fromHandlerInterfaceasabstractso that Java RMI's dynamic proxy forwards the call to the remoteMonitorServer.- Specified by:
reloadHttpCertificatein interfaceHandlerInterface- Throws:
RemoteException- the remote exception
-