backport concurrent
timeoutSeconds polish in conversation management system
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package org.springframework.webflow.conversation.impl;
|
||||
|
||||
import org.springframework.webflow.conversation.ConversationException;
|
||||
|
||||
/**
|
||||
* Thrown if a conversation id could not be parsed.
|
||||
*
|
||||
* @author Keith Donald
|
||||
*/
|
||||
public class BadlyFormattedConversationIdException extends ConversationException {
|
||||
|
||||
/**
|
||||
* Creates a new badly formatted conversation id exception.
|
||||
* @param encodedId the badly formatted id
|
||||
* @param parseException the cause
|
||||
*/
|
||||
public BadlyFormattedConversationIdException(String encodedId, Throwable parseException) {
|
||||
super("Unable to parse string-encoded conversationId + '" + encodedId + "'", parseException);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.springframework.webflow.conversation.impl;
|
||||
|
||||
import org.springframework.webflow.conversation.ConversationLockException;
|
||||
|
||||
/**
|
||||
* <code>Exception</code> indicating that some {@link Thread} was {@link Thread#interrupt() interrupted} during
|
||||
* processing and as such processing was halted.
|
||||
* <p>
|
||||
* Only used to wrap the checked {@link InterruptedException java.lang.InterruptedException}.
|
||||
*/
|
||||
public class LockInterruptedException extends ConversationLockException {
|
||||
|
||||
/**
|
||||
* Creates a new <code>SystemInterruptedException</code>.
|
||||
* @param cause the root cause of this <code>Exception</code>
|
||||
*/
|
||||
public LockInterruptedException(InterruptedException cause) {
|
||||
super("Unable to acquire conversation lock - thread interrupted", cause);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springframework.webflow.conversation.impl;
|
||||
|
||||
import org.springframework.webflow.conversation.ConversationLockException;
|
||||
|
||||
/**
|
||||
* Thrown when a lock could not be acquired after a timeout period.
|
||||
*
|
||||
* @author Keith Donald
|
||||
*/
|
||||
public class LockTimeoutException extends ConversationLockException {
|
||||
|
||||
public LockTimeoutException(int timeoutSeconds) {
|
||||
super("Unable to acquire conversation lock after " + timeoutSeconds + " seconds");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user