Class VirtualizedMonitorPropCnr

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.server.monitor.VirtualizedMonitorPropCnr
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, IEndPointListener, Cloneable
Direct Known Subclasses:
EditorVirtualizedMonitorPropCnr

public class VirtualizedMonitorPropCnr extends PropCnr implements IEndPointListener
Property container used for Virtual Monitor data and communication.
Author:
Christopher Mindus
  • Field Details

    • DEBUG

      public static boolean DEBUG
      Very verbose output.
    • monitor

      protected IVirtualizedMonitor monitor
      The server monitor interface, null when not a monitor (i.e. end-point in server).
  • Constructor Details

    • VirtualizedMonitorPropCnr

      public VirtualizedMonitorPropCnr()
      Constructor for transactions.
    • VirtualizedMonitorPropCnr

      public VirtualizedMonitorPropCnr(Atom atom, IVirtualizedMonitor monitor)
      Constructor for monitor.
  • Method Details

    • clone

      public VirtualizedMonitorPropCnr clone()
      Clone must be overridden.
      Overrides:
      clone in class PropCnr
    • cloneWithoutSecrets

      public static PropCnr cloneWithoutSecrets(PropCnr cnr)
      Creates the copy of a live server property container that is sent to the monitor: a deep clone in which no secret value remains, while the structure is kept so that the monitor still shows which settings exist. Every PasswordProp gets the empty string, every PKCS12IdentityProp keeps only its description (the text before the first NUL byte, and that byte) without the keystore, and every entry of a customApp map (ServerConfigEnvProps.CUSTOM_APP_SETTINGS) keeps its key with an empty value. A read-only flag on the copy is cleared first; a value that still cannot be emptied (an unmodifiable map, a validator refusing the empty value) is removed from the copy instead.

      The values are emptied rather than set to null: the copy travels in a create transaction, and PasswordProp.initializeValue refuses a null value on the receiving side (the property is not nullable), which would dispose of the monitor connection. The description of an identity is kept because PKCS12IdentityProp.getIdentityDescription() requires the NUL byte.

      Parameters:
      cnr - The live container, e.g. the server settings or the server properties.
      Returns:
      The copy without secret values, an orphan.
    • requestServerPlugins

      public void requestServerPlugins()
      Requests the list of plug-ins registered with the server and all the applications it is running.
    • requestBrowsableClients

      public void requestBrowsableClients()
      Request the list of clients that are browsable. The PropMgr owner must be an instance of IVirtualizedMonitor to get the callback when request has completed.
    • onRemoteEvent

      public void onRemoteEvent(RemoteEvent event)
      Processing of remote events.
      Specified by:
      onRemoteEvent in interface IGProp<GProp<?>[]>
      Overrides:
      onRemoteEvent in class GProp<GProp<?>[]>
      Parameters:
      event - The remote event.
    • onEndPointCreated

      public void onEndPointCreated(IEndPoint endPoint)
      Called when an end point is created.
      Specified by:
      onEndPointCreated in interface IEndPointListener
    • onEndPointDisposed

      public void onEndPointDisposed(IEndPoint endPoint)
      Called when an end point is disposed of.
      Specified by:
      onEndPointDisposed in interface IEndPointListener
    • onPropDispose

      protected void onPropDispose()
      Called when a property is disposed of by delete/remove in a container, or by the dispose method.

      This call is done just at the end of the delete/remove routine in the container, without synchronization.

      Overrides:
      onPropDispose in class PropCnr