Interface HandlerInterface
- All Superinterfaces:
ClientInterface, Remote
- All Known Subinterfaces:
MonitorInterface
- All Known Implementing Classes:
HandlerServer, MasterServer, MonitorServer
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddeployHttpCertificate(byte[] pkcs12Bytes, String keystorePassword) Deploys a new PKCS#12 keystore to this handler's HTTPS server and reloads the certificate.default StringReturns a JSON-encoded snapshot of the TLS certificate currently loaded by this handler's HTTPS server, or"{}"if no certificate is available.voidhandle(PluginEvent<?> event) Handle a single event.voidhandle(PluginEvent<?>[] events) Handle a list of events.default voidHot-reloads the TLS certificate from the keystore file currently on disk.Methods inherited from interface ClientInterface
getPassword, getRoot, getService
-
Method Details
-
handle
Handle a list of events.- Parameters:
events- the events- Throws:
RemoteException- the remote exception
-
handle
Handle a single event.- Parameters:
event- the event- Throws:
RemoteException- the remote exception
-
getHttpCertificateJson
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
defaultmethod returning"{}". Java RMI'sRemoteObjectInvocationHandler(Java 9+) invokes default interface methods locally on the caller JVM rather than forwarding the call to the remote object. The pre-compiledHandlerServer_Stubinecaccess-stubs.jarwas generated before this method existed and has no entry for it.Monitors running as
MonitorServerinstead of the legacyHandlerServerimplementMonitorInterface, which re-declares this method asabstract. SinceMonitorInterfacehas no pre-compiled stub, RMI uses a dynamic proxy that properly forwards the call to the remoteMonitorServer. Thedefaulthere preserves backward compatibility for legacy clients that still present aHandlerServer_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
defaultno-op — seegetHttpCertificateJson()for the rationale. Monitors running asMonitorServeroverride this method viaMonitorInterfaceand receive the call over the direct RMI channel.- 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. This is adefaultno-op; the actual reload is performed onMonitorServervia the abstract override inMonitorInterface.- Throws:
RemoteException- the remote exception
-