Module glf.api

Class BasicMarkerFactory

java.lang.Object
org.seppiko.glf.event.BasicMarkerFactory
All Implemented Interfaces:
IMarkerFactory

public class BasicMarkerFactory extends Object implements IMarkerFactory
Basic Marker Factory for Marker Factory interface default implementation
Author:
Leonard Woo
  • Constructor Details

    • BasicMarkerFactory

      public BasicMarkerFactory()
  • Method Details

    • getMarker

      public Marker getMarker(String name)
      Description copied from interface: IMarkerFactory
      Manufacture a Marker instance by name. If the instance has been created earlier, return the previously created instance.

      Null name values are not allowed.

      Specified by:
      getMarker in interface IMarkerFactory
      Parameters:
      name - the name of the marker to be created, null value is not allowed.
      Returns:
      a Marker instance.
    • exists

      public boolean exists(String name)
      Description copied from interface: IMarkerFactory
      Checks if the marker with the name already exists. If name is null, then false is returned.
      Specified by:
      exists in interface IMarkerFactory
      Parameters:
      name - logger name to check for
      Returns:
      true id the marker exists, false otherwise.
    • detachMarker

      public boolean detachMarker(String name)
      Description copied from interface: IMarkerFactory
      Detach an existing marker.

      Note that after a marker is detached, there might still be "dangling" references to the detached marker.

      Specified by:
      detachMarker in interface IMarkerFactory
      Parameters:
      name - The name of the marker to detach.
      Returns:
      whether the marker could be detached or not.
    • getDetachedMarker

      public Marker getDetachedMarker(String name)
      Description copied from interface: IMarkerFactory
      Create a marker which is detached (even at birth) from this IMarkerFactory.
      Specified by:
      getDetachedMarker in interface IMarkerFactory
      Parameters:
      name - marker name.
      Returns:
      a dangling marker.