Class ContextStatusServiceImpl

  • All Implemented Interfaces:
    org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>

    public class ContextStatusServiceImpl
    extends java.lang.Object
    implements org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getContextStatus​(java.lang.String instanceName, java.lang.String contextName)  
      java.lang.String getContextStatusForJob​(java.lang.String instanceName, java.lang.String contextName, java.lang.String jobIdentifier)  
      java.lang.String getJsonContextJobStatus​(org.ikasan.spec.scheduled.instance.model.InstanceStatus instanceStatus, java.util.Map<java.lang.String,​org.ikasan.job.orchestration.core.machine.ContextMachine> mapAllContextMachine)
      Get the status of all jobs in the Context Machine
      java.lang.String getJsonContextMachineStatus​(boolean includePrepared)
      Get that status of all instances from the Context machine
      java.lang.String getJsonContextStatus​(java.lang.String instanceName, java.lang.String contextName)
      Get the status of an instance context or a child context in JSON format.
      java.lang.String getJsonContextStatusForJob​(java.lang.String instanceName, java.lang.String contextName, java.lang.String jobName)
      Get the status of a Scheduler Job Instance in JSON format.
      • Methods inherited from class java.lang.Object

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

      • ContextStatusServiceImpl

        public ContextStatusServiceImpl()
    • Method Detail

      • getJsonContextMachineStatus

        public java.lang.String getJsonContextMachineStatus​(boolean includePrepared)
                                                     throws com.fasterxml.jackson.core.JsonProcessingException
        Get that status of all instances from the Context machine
        Specified by:
        getJsonContextMachineStatus in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
        Parameters:
        includePrepared - - true to include prepared and not active context instance
        Returns:
        ContextMachineStatusWrapperImpl in Json
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if issue transforming to Json
      • getJsonContextJobStatus

        public java.lang.String getJsonContextJobStatus​(org.ikasan.spec.scheduled.instance.model.InstanceStatus instanceStatus,
                                                        java.util.Map<java.lang.String,​org.ikasan.job.orchestration.core.machine.ContextMachine> mapAllContextMachine)
                                                 throws com.fasterxml.jackson.core.JsonProcessingException
        Get the status of all jobs in the Context Machine
        Specified by:
        getJsonContextJobStatus in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
        Parameters:
        instanceStatus - - optional value to search for a particular instance status. Set to null to return everything
        mapAllContextMachine - - option map of context machine to found the status on. Set to null or empty to return bring back all active instances
        Returns:
        ContextJobInstanceStatusWrapperImpl in JSON
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if issue transforming to Json
      • getContextStatus

        public java.lang.String getContextStatus​(java.lang.String instanceName,
                                                 java.lang.String contextName)
        Specified by:
        getContextStatus in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
      • getContextStatusForJob

        public java.lang.String getContextStatusForJob​(java.lang.String instanceName,
                                                       java.lang.String contextName,
                                                       java.lang.String jobIdentifier)
        Specified by:
        getContextStatusForJob in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
      • getJsonContextStatus

        public java.lang.String getJsonContextStatus​(java.lang.String instanceName,
                                                     java.lang.String contextName)
                                              throws com.fasterxml.jackson.core.JsonProcessingException
        Get the status of an instance context or a child context in JSON format. Will not return any Prepared instances
        Specified by:
        getJsonContextStatus in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
        Parameters:
        instanceName - Context name assigned to the ContextMachineCache
        contextName - Context or Child Context to search on
        Returns:
        Mapped json representation of the current state of the Context Instance at the time of request
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if issue transforming to Json
      • getJsonContextStatusForJob

        public java.lang.String getJsonContextStatusForJob​(java.lang.String instanceName,
                                                           java.lang.String contextName,
                                                           java.lang.String jobName)
                                                    throws com.fasterxml.jackson.core.JsonProcessingException
        Get the status of a Scheduler Job Instance in JSON format. Will not return any Prepared instances
        Specified by:
        getJsonContextStatusForJob in interface org.ikasan.spec.scheduled.context.service.ContextStatusService<org.ikasan.job.orchestration.core.machine.ContextMachine>
        Parameters:
        instanceName - Context name assigned to the ContextMachineCache
        contextName - Context or Child Context to search on
        jobName - the job name to find the state for
        Returns:
        Mapped json representation of the current state of the Scheduler Job Instance at the time of request
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if issue transforming to Json