Class MonitorServer

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

public final class MonitorServer extends StarterServer implements MonitorInterface
The Class MonitorServer.

Entry point for the ECpds Monitor daemon. Replaces the legacy ecmwf.common.ecaccess.HandlerServer as the RMI-exported server object on monitor hosts.

By implementing MonitorInterface (which is part of open-ecpds rather than the pre-compiled ecaccess-stubs.jar), Java RMI uses a dynamic proxy when the master connects to this server. A dynamic proxy forwards all non-default abstract methods — including getHttpCertificateJson() and deployHttpCertificate(byte[], String) — to this remote object over the network. This resolves the Java 9+ RMI issue where default interface methods on HandlerInterface were invoked locally on the master JVM instead of being forwarded to the remote monitor.

Start monitors with:

JAVA_OPTS = "$JAVA_OPTS -Decmwf.common.starter.name=ecmwf.ecpds.monitor.MonitorServer"

The service name ("ECpdsMonitor") is unchanged, so existing master configuration and the getMonitorInterface() lookup are backward-compatible at the service-registration level.

See Also: