Class ContextBase

    • Constructor Summary

      Constructors 
      Constructor Description
      ContextBase()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addScheduledFuture​(java.util.concurrent.ScheduledFuture<?> scheduledFuture)
      Deprecated.
       
      long getBirthTime()
      Deprecated.
      The time at which this context was created, expressed in millisecond elapsed since the epoch (1.1.1970).
      java.lang.Object getConfigurationLock()
      Deprecated.
      Object used for synchronization purposes.
      java.util.Map<java.lang.String,​java.lang.String> getCopyOfPropertyMap()
      Deprecated.
      Get a copy of the property map
      java.util.concurrent.ExecutorService getExecutorService()
      Deprecated.
      Every context has an ExecutorService which be invoked to execute certain tasks in a separate thread.
      java.lang.String getName()
      Deprecated.
      Contexts are named objects.
      java.lang.Object getObject​(java.lang.String key)
      Deprecated.
      A Context can act as a store for various objects used by LOGBack components.
      java.lang.String getProperty​(java.lang.String key)
      Deprecated.
      Given a key, return the corresponding property value.
      java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
      Deprecated.
      Returns the ScheduledExecutorService for this context.
      java.util.List<java.util.concurrent.ScheduledFuture<?>> getScheduledFutures()
      Deprecated.
       
      StatusManager getStatusManager()
      Deprecated.
      Return the StatusManager instance in use.
      boolean isStarted()
      Deprecated.
       
      void putObject​(java.lang.String key, java.lang.Object value)
      Deprecated.
      Store an object under 'key'.
      void putProperty​(java.lang.String key, java.lang.String val)
      Deprecated.
      Set a property of this context.
      void register​(LifeCycle component)
      Deprecated.
      Register a component that participates in the context's life cycle.
      void removeObject​(java.lang.String key)
      Deprecated.
       
      void reset()
      Deprecated.
      Clear the internal objectMap and all properties.
      void setName​(java.lang.String name)
      Deprecated.
      The context name can be set only if it is not already set, or if the current name is the default context name, namely "default", or if the current name and the old name are the same.
      void setStatusManager​(StatusManager statusManager)
      Deprecated.
      Set the StatusManager for this context.
      void start()
      Deprecated.
       
      void stop()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ContextBase

        public ContextBase()
        Deprecated.
    • Method Detail

      • setStatusManager

        public void setStatusManager​(StatusManager statusManager)
        Deprecated.
        Set the StatusManager for this context. Note that by default this context is initialized with a BasicStatusManager. A null value for the 'statusManager' argument is not allowed.

        A malicious attacker can set the status manager to a dummy instance, disabling internal error reporting.

        Parameters:
        statusManager - the new status manager
      • putProperty

        public void putProperty​(java.lang.String key,
                                java.lang.String val)
        Deprecated.
        Description copied from interface: Context
        Set a property of this context.
        Specified by:
        putProperty in interface Context
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Deprecated.
        Given a key, return the corresponding property value. If invoked with the special key "CONTEXT_NAME", the name of the context is returned.
        Specified by:
        getProperty in interface Context
        Specified by:
        getProperty in interface PropertyContainer
        Parameters:
        key -
        Returns:
      • getObject

        public java.lang.Object getObject​(java.lang.String key)
        Deprecated.
        Description copied from interface: Context
        A Context can act as a store for various objects used by LOGBack components.
        Specified by:
        getObject in interface Context
        Returns:
        The object stored under 'key'.
      • putObject

        public void putObject​(java.lang.String key,
                              java.lang.Object value)
        Deprecated.
        Description copied from interface: Context
        Store an object under 'key'. If no object can be found, null is returned.
        Specified by:
        putObject in interface Context
      • removeObject

        public void removeObject​(java.lang.String key)
        Deprecated.
      • getName

        public java.lang.String getName()
        Deprecated.
        Description copied from interface: Context
        Contexts are named objects.
        Specified by:
        getName in interface Context
        Returns:
        the name for this context
      • start

        public void start()
        Deprecated.
        Specified by:
        start in interface LifeCycle
      • stop

        public void stop()
        Deprecated.
        Specified by:
        stop in interface LifeCycle
      • isStarted

        public boolean isStarted()
        Deprecated.
        Specified by:
        isStarted in interface LifeCycle
      • reset

        public void reset()
        Deprecated.
        Clear the internal objectMap and all properties. Removes registered shutdown hook
      • setName

        public void setName​(java.lang.String name)
                     throws java.lang.IllegalStateException
        Deprecated.
        The context name can be set only if it is not already set, or if the current name is the default context name, namely "default", or if the current name and the old name are the same.
        Specified by:
        setName in interface Context
        Throws:
        java.lang.IllegalStateException - if the context already has a name, other than "default".
      • getBirthTime

        public long getBirthTime()
        Deprecated.
        Description copied from interface: Context
        The time at which this context was created, expressed in millisecond elapsed since the epoch (1.1.1970).
        Specified by:
        getBirthTime in interface Context
        Returns:
        The time as measured when this class was created.
      • getConfigurationLock

        public java.lang.Object getConfigurationLock()
        Deprecated.
        Description copied from interface: Context
        Object used for synchronization purposes. INTENDED FOR INTERNAL USAGE.
        Specified by:
        getConfigurationLock in interface Context
      • getExecutorService

        public java.util.concurrent.ExecutorService getExecutorService()
        Deprecated.
        Description copied from interface: Context
        Every context has an ExecutorService which be invoked to execute certain tasks in a separate thread.
        Specified by:
        getExecutorService in interface Context
        Returns:
        the executor for this context.
      • getScheduledExecutorService

        public java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
        Deprecated.
        Description copied from interface: Context
        Returns the ScheduledExecutorService for this context.
        Specified by:
        getScheduledExecutorService in interface Context
        Returns:
      • register

        public void register​(LifeCycle component)
        Deprecated.
        Description copied from interface: Context
        Register a component that participates in the context's life cycle.

        All components registered via this method will be stopped and removed from the context when the context is reset.

        Specified by:
        register in interface Context
        Parameters:
        component - the subject component
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • addScheduledFuture

        public void addScheduledFuture​(java.util.concurrent.ScheduledFuture<?> scheduledFuture)
        Deprecated.
        Specified by:
        addScheduledFuture in interface Context
      • getScheduledFutures

        public java.util.List<java.util.concurrent.ScheduledFuture<?>> getScheduledFutures()
        Deprecated.