Class AbstractController

    • Method Detail

      • verifyCreation

        abstract boolean verifyCreation()
        isValid is used to indicate if the Controller is created. If false, we can null the controller and reduce overhead.
        Returns:
        isValid
      • handleMessage

        abstract void handleMessage​(java.lang.String message,
                                    DeviceServer deviceServer)
        Break down a message and use it.
        Parameters:
        message - message for controller to parse and take action
        deviceServer - DeviceServer that sent this message, used to send response messages to proper client
      • register

        abstract void register()
        Register as listener of NamedBeans to be updated of changes.
      • deregister

        abstract void deregister()
        Deregister as listener of NamedBeans
      • buildList

        public void buildList​(Manager<?> manager)
        Build list only if there are no controller listeners. This way the list is not changed while in use. This should only be called by a subclass of jmri.Manager *Manager can implement specifics in register().
        Parameters:
        manager - which manager to get system names for.
      • checkCanBuildList

        public void checkCanBuildList()
        If no listeners, clear sysNameList pointer and allow list to be re-built Manager can implement specifics in deregister().
      • addControllerListener

        public void addControllerListener​(ControllerInterface listener)
        Add a listener to handle: listener.sendPacketToDevice(message);
        Parameters:
        listener - listener to add to listeners list