Class Stations


  • class Stations
    extends java.lang.Object
    A thread safe holder for Station. Provides methods to access to the Stations of the EventStudio creating a new one when requred.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger LOG  
      private java.util.concurrent.ConcurrentMap<java.lang.String,​Station> stations  
    • Constructor Summary

      Constructors 
      Constructor Description
      Stations()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void clear​(java.lang.String station)  
      (package private) Station getStation​(java.lang.String stationName)  
      (package private) java.util.Collection<Station> getStations()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
      • stations

        private final java.util.concurrent.ConcurrentMap<java.lang.String,​Station> stations
    • Constructor Detail

      • Stations

        Stations()
    • Method Detail

      • getStation

        Station getStation​(java.lang.String stationName)
        Returns:
        the station with the given name. It safely creates a new Station if a station with the given name does not exist.
        Throws:
        java.lang.IllegalArgumentException - if the station name is blank or null
      • getStations

        java.util.Collection<Station> getStations()
        Returns:
        the collection of the configured stations
        See Also:
        ConcurrentHashMap.values()
      • clear

        void clear​(java.lang.String station)