001: /* Copyright 2001, 2004 The JA-SIG Collaborative. All rights reserved.
002: * See license distributed with this file and
003: * available online at http://www.uportal.org/license.html
004: */
005:
006: package org.jasig.portal;
007:
008: /**
009: * This exception would inform uPortal that a
010: * a channel has encountered an internal timeout
011: * exception.
012: * @author Peter Kharchenko
013: * @version $Revision: 34871 $
014: */
015: public class InternalTimeoutException extends PortalException {
016:
017: /**
018: * Timeout value, in milliseconds, that was exceeded.
019: */
020: private Long timeoutValue = null;
021:
022: /**
023: * Instantiate a bare InternalTimeoutException.
024: * Deprecated because it would be so much more helpful if you
025: * instead use a constructor that takes a message, etc.
026: */
027: public InternalTimeoutException() {
028: super ();
029: }
030:
031: /**
032: * Instantiate an InternalTimeoutException, conveying the given message.
033: * @param msg message explaining the nature of the timeout
034: */
035: public InternalTimeoutException(String msg) {
036: super (msg);
037: }
038:
039: /**
040: * Instantiate an InternalTimeoutException conveying a message and
041: * specifying the timeout that was exceeded.
042: * @param msg describes nature of timeout
043: * @param timeoutValue the timeout value in milliseconds that was exceeded
044: */
045: public InternalTimeoutException(String msg, long timeoutValue) {
046: super (msg);
047: this .timeoutValue = new Long(timeoutValue);
048: }
049:
050: /**
051: * Instantiate an InternalTimeoutException conveying a message and
052: * specifying the timeout value that was exceeded as well as whether
053: * refresh and reinstantiation are appropriate responses to this problem.
054: * @param msg describes nature of timeout
055: * @param timeoutValue timeout value in milliseconds that was exceeded
056: * @param refresh true if refresh is an appropriate response
057: * @param reinstantiate true if reinstantiation is an appropriate response
058: */
059: public InternalTimeoutException(String msg, long timeoutValue,
060: boolean refresh, boolean reinstantiate) {
061: super (msg, refresh, reinstantiate);
062: this .timeoutValue = new Long(timeoutValue);
063: }
064:
065: /**
066: * Instantiate an InternalTimeoutException conveying a message and underlying
067: * cause and specifying the timeout value that was exceeded as well as whether
068: * refresh and reinstantiation are appropriate responses to this problem.
069: * @param msg describes nature of timeout
070: * @param cause underlying cause
071: * @param timeoutValue timeout value in milliseconds that was exceeded
072: * @param refresh true if refresh is an appropriate response
073: * @param reinstantiate true if reinstantiation is an appropriate response
074: */
075: public InternalTimeoutException(String msg, Throwable cause,
076: long timeoutValue, boolean refresh, boolean reinstantiate) {
077: super (msg, cause, refresh, reinstantiate);
078: this .timeoutValue = new Long(timeoutValue);
079: }
080:
081: /**
082: * Instantiate an InternalTimeoutException conveying a message and specifying
083: * whether refresh and reinstantiation are appropriate responses.
084: * @param msg describes nature of timeout problem
085: * @param refresh true if refresh is an appropriate response
086: * @param reinstantiate true if reinstantiation is an appropriate response
087: */
088: public InternalTimeoutException(String msg, boolean refresh,
089: boolean reinstantiate) {
090: super (msg, refresh, reinstantiate);
091: }
092:
093: /**
094: * Get the timeout value, in milliseconds, that was exceeded.
095: * @return the timeout value, or null if none was recorded.
096: */
097: public Long getTimeoutValue() {
098: return this.timeoutValue;
099: }
100:
101: }
|