Interface ISubmitter<T>

Type Parameters:
T - Bean type which will be submitted.
All Superinterfaces:
AutoCloseable, IConnection, IURIConnection

public interface ISubmitter<T> extends IURIConnection
A submitter is a queue connection which may receive a submission on to the queue.
  • Method Details

    • submit

      void submit(T bean) throws EventException
      Send a submission on to the queue.
      Parameters:
      bean -
      Throws:
      EventException
    • blockingSubmit

      Send a submission on to the queue. Blocks until bean is updated with "final" status. This method depends on this.setStatusTopicName() already having been called with the appropriate status queue name by the user of this ISubmitter, because this method's implementation listens to the said status topic to determine when to return.
      Parameters:
      bean -
      Throws:
      EventException
      InterruptedException
      IllegalStateException - if this.getStatusTopicName() returns null.
      ScanningException - if the scan finishes with Status.FAILED.
    • getStatusTopicName

      String getStatusTopicName()
      The status topic, if any, that after submission, the job queue will publish events from. May be left unset.
      Returns:
    • setStatusTopicName

      void setStatusTopicName(String name)
      The status topic, if any, that after submission, the job queue will publish events from. May be left unset.
      Parameters:
      name -
    • getPriority

      int getPriority()
      Returns:
      the priority of messages submitted by this submitter.
    • setPriority

      void setPriority(int priority)
      Sets the priority of messages submitted by this submitter. From the Javadoc from the underlying JMS implementation (javax.jms.MessageProducer#setPriority):

      The JMS API defines ten levels of priority value, with 0 as the lowest priority and 9 as the highest. Clients should consider priorities 0-4 as gradations of normal priority and priorities 5-9 as gradations of expedited priority. Priority is set to 4 by default.

      Parameters:
      priority -
    • getLifeTime

      long getLifeTime()
      Returns:
      the lifetime of messages
    • setLifeTime

      void setLifeTime(long lifetime)
      Sets the lifetime of messages.
      Parameters:
      lifetime -