Package javax.jms

Examples of javax.jms.IllegalStateException


   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setDisableMessageID(boolean value) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");
  }
View Full Code Here


   * @exception IllegalStateException  If the producer is closed.
   * @exception JMSException  When setting an invalid delivery mode.
   */
  public synchronized void setDeliveryMode(int deliveryMode) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (deliveryMode != javax.jms.DeliveryMode.PERSISTENT
        && deliveryMode != javax.jms.DeliveryMode.NON_PERSISTENT)
      throw new JMSException("Can't set invalid delivery mode.");

View Full Code Here

   * @exception IllegalStateException  If the producer is closed.
   * @exception JMSException  When setting an invalid priority.
   */
  public synchronized void setPriority(int priority) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (priority < 0 || priority > 9)
      throw new JMSException("Can't set invalid priority value.");

    this.priority = priority;
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setTimeToLive(long timeToLive) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    this.timeToLive = timeToLive;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setDisableMessageTimestamp(boolean value) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    this.timestampDisabled = value;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized javax.jms.Destination getDestination() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return dest;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized boolean getDisableMessageID() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return messageIDDisabled;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized int getDeliveryMode() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return deliveryMode;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized int getPriority() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return priority;
  }
View Full Code Here

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized long getTimeToLive() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return timeToLive;
  }
View Full Code Here

TOP

Related Classes of javax.jms.IllegalStateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.