Class AbstractDevConsole

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.console.DevConsole, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public abstract class AbstractDevConsole
    extends org.apache.camel.support.service.ServiceSupport
    implements org.apache.camel.console.DevConsole, org.apache.camel.CamelContextAware
    Base implementation for DevConsole.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.camel.console.DevConsole

        org.apache.camel.console.DevConsole.MediaType
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
      • Fields inherited from interface org.apache.camel.console.DevConsole

        CONSOLE_GROUP, CONSOLE_ID
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      Object call​(org.apache.camel.console.DevConsole.MediaType mediaType, Map<String,​Object> options)  
      protected abstract Map<String,​Object> doCallJson​(Map<String,​Object> options)
      Invokes and gets the output from this console in json format.
      protected abstract String doCallText​(Map<String,​Object> options)
      Invokes and gets the output from this console in text format.
      boolean equals​(Object o)  
      org.apache.camel.CamelContext getCamelContext()  
      String getDescription()  
      String getDisplayName()  
      String getGroup()  
      String getId()  
      int hashCode()  
      void setCamelContext​(org.apache.camel.CamelContext camelContext)  
      boolean supportMediaType​(org.apache.camel.console.DevConsole.MediaType mediaType)  
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.console.DevConsole

        call
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

    • Method Detail

      • getCamelContext

        public org.apache.camel.CamelContext getCamelContext()
        Specified by:
        getCamelContext in interface org.apache.camel.CamelContextAware
      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Specified by:
        setCamelContext in interface org.apache.camel.CamelContextAware
      • supportMediaType

        public boolean supportMediaType​(org.apache.camel.console.DevConsole.MediaType mediaType)
        Specified by:
        supportMediaType in interface org.apache.camel.console.DevConsole
      • getGroup

        public String getGroup()
        Specified by:
        getGroup in interface org.apache.camel.console.DevConsole
      • getId

        public String getId()
        Specified by:
        getId in interface org.apache.camel.console.DevConsole
      • getDisplayName

        public String getDisplayName()
        Specified by:
        getDisplayName in interface org.apache.camel.console.DevConsole
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface org.apache.camel.console.DevConsole
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • call

        public Object call​(org.apache.camel.console.DevConsole.MediaType mediaType,
                           Map<String,​Object> options)
        Specified by:
        call in interface org.apache.camel.console.DevConsole
      • doCallJson

        protected abstract Map<String,​Object> doCallJson​(Map<String,​Object> options)
        Invokes and gets the output from this console in json format. The returned object can for example be an org.apache.camel.util.json.JsonObject from camel-util-json to represent JSon data.
        See Also:
        DevConsole.call(MediaType, Map)
      • doCallText

        protected abstract String doCallText​(Map<String,​Object> options)
        Invokes and gets the output from this console in text format.
        See Also:
        DevConsole.call(MediaType, Map)