Package jmri

Interface RouteManager

All Superinterfaces:
Manager<Route>, PropertyChangeProvider, ProvidingManager<Route>, SilenceablePropertyChangeProvider, VetoableChangeProvider
All Known Implementing Classes:
DefaultRouteManager

public interface RouteManager
extends ProvidingManager<Route>
Interface for obtaining Routes.

This doesn't have a "new" method, since Routes are separately implemented, instead of being system-specific.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  • Method Details

    • dispose

      void dispose()
      Description copied from interface: Manager
      Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.
      Specified by:
      dispose in interface Manager<Route>
    • provideRoute

      @Nonnull Route provideRoute​(@Nonnull String systemName, String userName)
      Create a new Route if the route does not exist.
      Parameters:
      systemName - the system name for the route
      userName - the user name for the route
      Returns:
      null if a Route with the same systemName or userName already exists or if there is trouble creating a new Route
    • newRoute

      Create a new Route if the route does not exist. Intended for use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.
      Parameters:
      userName - user name for the new route
      Returns:
      null if a Route with the same userName already exists or if there is trouble creating a new Route
    • getRoute

      Locate via user name, then system name if needed. Does not create a new one if nothing found
      Parameters:
      name - User name or system name to match
      Returns:
      null if no match found
    • getByUserName

      Description copied from interface: Manager
      Locate an existing instance based on a user name.
      Specified by:
      getByUserName in interface Manager<Route>
      Parameters:
      s - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • getBySystemName

      Description copied from interface: Manager
      Locate an existing instance based on a system name.
      Specified by:
      getBySystemName in interface Manager<Route>
      Parameters:
      s - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • deleteRoute

      Delete Route by removing it from the manager. The Route must first be deactivated so it stops processing.
      Parameters:
      r - the route to remove