org.rhq.enterprise.communications.util
Class NotPermittedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.rhq.enterprise.communications.util.NotPermittedException
All Implemented Interfaces:
Serializable

public class NotPermittedException
extends RuntimeException

Thrown when the ConcurrencyManager determines that a thread is not permitted to continue.

This exception has a sleep-before-retry attribute that is used by the client where this exception bubbles up to. It is a hint to the client that it should wait the given number of milliseconds before it should attempt to retry, if it wants to retry at all.

Author:
John Mazzitelli
See Also:
Serialized Form

Constructor Summary
NotPermittedException(long sleepBeforeRetry)
           
 
Method Summary
 long getSleepBeforeRetry()
          A catcher of this exception should not attempt to retry what it just did to cause this exception until after this given amount of milliseconds elapses.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotPermittedException

public NotPermittedException(long sleepBeforeRetry)
Method Detail

getSleepBeforeRetry

public long getSleepBeforeRetry()
A catcher of this exception should not attempt to retry what it just did to cause this exception until after this given amount of milliseconds elapses.

Returns:
time, in milliseconds, that the client should wait before doing its thing again


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.