Class GenericAbstractDispatcher

  • All Implemented Interfaces:
    LocalDispatcher

    public abstract class GenericAbstractDispatcher
    extends java.lang.Object
    implements LocalDispatcher
    Generic Services Local Dispatcher
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCommitService​(java.lang.String serviceName, boolean persist, java.lang.Object... context)  
      void addCommitService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean persist)
      Adds a commit service to the current TX using ServiceSynchronization
      void addRollbackService​(java.lang.String serviceName, boolean persist, java.lang.Object... context)  
      void addRollbackService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean persist)
      Adds a rollback service to the current TX using ServiceSynchronization
      void deregister()
      De-Registers this LocalDispatcher
      DispatchContext getCtx()
      Gets ctx.
      Delegator getDelegator()
      Gets the GenericEntityDelegator associated with this dispatcher
      DispatchContext getDispatchContext()
      Returns the DispatchContext created by this dispatcher
      ServiceDispatcher getDispatcher()
      Gets dispatcher.
      JmsListenerFactory getJMSListeneFactory()
      Gets the JmsListenerFactory which holds the message listeners.
      JobManager getJobManager()
      Gets the JobManager associated with this dispatcher
      java.lang.String getName()
      Returns the Name of this local dispatcher
      Security getSecurity()
      Gets the Security object associated with this dispatcher
      void registerCallback​(java.lang.String serviceName, GenericServiceCallback cb)
      Register a callback listener on a specific service.
      void schedule​(java.lang.String serviceName, long startTime, int frequency, int interval, int count, long endTime, java.lang.Object... context)  
      void schedule​(java.lang.String serviceName, long startTime, int frequency, int interval, int count, java.lang.Object... context)  
      void schedule​(java.lang.String serviceName, long startTime, int frequency, int interval, long endTime, java.lang.Object... context)  
      void schedule​(java.lang.String serviceName, long startTime, java.lang.Object... context)  
      void schedule​(java.lang.String poolName, java.lang.String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, java.lang.Object... context)  
      void schedule​(java.lang.String jobName, java.lang.String poolName, java.lang.String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, java.lang.Object... context)  
      void schedule​(java.lang.String jobName, java.lang.String poolName, java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry)
      Schedule a service to run asynchronously at a specific start time.
      void schedule​(java.lang.String poolName, java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry)
      Schedule a service to run asynchronously at a specific start time.
      void schedule​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime)
      Schedule a service to run asynchronously at a specific start time.
      void schedule​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime, int frequency, int interval, int count)
      Schedule a service to run asynchronously at a specific start time.
      void schedule​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime)
      Schedule a service to run asynchronously at a specific start time.
      void schedule​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, long startTime, int frequency, int interval, long endTime)
      Schedule a service to run asynchronously at a specific start time.
      void setCtx​(DispatchContext ctx)
      Sets ctx.
      void setDispatcher​(ServiceDispatcher dispatcher)
      Sets dispatcher.
      void setName​(java.lang.String name)
      Sets name.
      • Methods inherited from class java.lang.Object

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

      • GenericAbstractDispatcher

        public GenericAbstractDispatcher()
    • Method Detail

      • setCtx

        public void setCtx​(DispatchContext ctx)
        Sets ctx.
        Parameters:
        ctx - the ctx
      • getDispatcher

        public ServiceDispatcher getDispatcher()
        Gets dispatcher.
        Returns:
        the dispatcher
      • setDispatcher

        public void setDispatcher​(ServiceDispatcher dispatcher)
        Sets dispatcher.
        Parameters:
        dispatcher - the dispatcher
      • setName

        public void setName​(java.lang.String name)
        Sets name.
        Parameters:
        name - the name
      • schedule

        public void schedule​(java.lang.String poolName,
                             java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime,
                             int frequency,
                             int interval,
                             int count,
                             long endTime,
                             int maxRetry)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        poolName - Name of the service pool to send to.
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        frequency - The frequency of the recurrence (RecurrenceRule.DAILY, etc).
        interval - The interval of the frequency recurrence.
        count - The number of times to repeat.
        endTime - The time in milliseconds the service should expire
        maxRetry - The number of times we should retry on failure
        Throws:
        ServiceAuthException
        ServiceValidationException
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String jobName,
                             java.lang.String poolName,
                             java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime,
                             int frequency,
                             int interval,
                             int count,
                             long endTime,
                             int maxRetry)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        jobName - Name of the job
        poolName - Name of the service pool to send to.
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        frequency - The frequency of the recurrence (RecurrenceRule.DAILY, etc).
        interval - The interval of the frequency recurrence.
        count - The number of times to repeat.
        endTime - The time in milliseconds the service should expire
        maxRetry - The number of times we should retry on failure
        Throws:
        ServiceAuthException
        ServiceValidationException
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String jobName,
                             java.lang.String poolName,
                             java.lang.String serviceName,
                             long startTime,
                             int frequency,
                             int interval,
                             int count,
                             long endTime,
                             int maxRetry,
                             java.lang.Object... context)
                      throws GenericServiceException
        Specified by:
        schedule in interface LocalDispatcher
        Throws:
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime,
                             int frequency,
                             int interval,
                             int count,
                             long endTime)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        frequency - The frequency of the recurrence (RecurrenceRule.DAILY, etc).
        interval - The interval of the frequency recurrence.
        count - The number of times to repeat.
        endTime - The time in milliseconds the service should expire
        Throws:
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime,
                             int frequency,
                             int interval,
                             int count)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        frequency - The frequency of the recurrence (RecurrenceRule.DAILY, etc).
        interval - The interval of the frequency recurrence.
        count - The number of times to repeat.
        Throws:
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime,
                             int frequency,
                             int interval,
                             long endTime)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        frequency - The frequency of the recurrence (RecurrenceRule.DAILY, etc).
        interval - The interval of the frequency recurrence.
        endTime - The time in milliseconds the service should expire
        Throws:
        GenericServiceException
      • schedule

        public void schedule​(java.lang.String serviceName,
                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                             long startTime)
                      throws GenericServiceException
        Description copied from interface: LocalDispatcher
        Schedule a service to run asynchronously at a specific start time.
        Specified by:
        schedule in interface LocalDispatcher
        Parameters:
        serviceName - Name of the service to invoke.
        context - The name/value pairs composing the context.
        startTime - The time to run this service.
        Throws:
        GenericServiceException
      • getJobManager

        public JobManager getJobManager()
        Description copied from interface: LocalDispatcher
        Gets the JobManager associated with this dispatcher
        Specified by:
        getJobManager in interface LocalDispatcher
        Returns:
        JobManager that is associated with this dispatcher
      • getDelegator

        public Delegator getDelegator()
        Description copied from interface: LocalDispatcher
        Gets the GenericEntityDelegator associated with this dispatcher
        Specified by:
        getDelegator in interface LocalDispatcher
        Returns:
        GenericEntityDelegator associated with this dispatcher
      • getSecurity

        public Security getSecurity()
        Description copied from interface: LocalDispatcher
        Gets the Security object associated with this dispatcher
        Specified by:
        getSecurity in interface LocalDispatcher
        Returns:
        Security object associated with this dispatcher
      • getName

        public java.lang.String getName()
        Description copied from interface: LocalDispatcher
        Returns the Name of this local dispatcher
        Specified by:
        getName in interface LocalDispatcher
        Returns:
        String representing the name of this local dispatcher
      • registerCallback

        public void registerCallback​(java.lang.String serviceName,
                                     GenericServiceCallback cb)
        Description copied from interface: LocalDispatcher
        Register a callback listener on a specific service.
        Specified by:
        registerCallback in interface LocalDispatcher
        Parameters:
        serviceName - Name of the service to link callback to.
        cb - The callback implementation.