org.apache.jetspeed.portlet
Class UnavailableException

java.lang.Object
  extended by javax.servlet.ServletException
      extended by org.apache.jetspeed.portlet.PortletException
          extended by org.apache.jetspeed.portlet.UnavailableException

Deprecated. since 6.0. Support of the IBM portlet API may be removed in a future release of WebSphere Portal. Use of the Java Portlet API (javax.portlet) is recommended instead.

public class UnavailableException
extends PortletException

Use the UnavailableException when the instantiation of a portlet fails.

Since:
4.1
See Also:
Portlet.init(PortletConfig)

Constructor Summary
UnavailableException(int seconds, Portlet portlet, java.lang.String msg)
          Deprecated. use UnavailableException(String, int) instead.
UnavailableException(Portlet portlet, java.lang.String msg)
          Deprecated. use UnavailableException(String) instead.
UnavailableException(java.lang.String msg)
          Deprecated. Constructs a new exception with a descriptive message indicating that the portlet is permanently unavailable.
UnavailableException(java.lang.String msg, int seconds)
          Deprecated. Constructs a new exception with a descriptive message indicating that the portlet is temporarily unavailable and giving an estimate of how long it will be unavailable.
 
Method Summary
 Portlet getPortlet()
          Deprecated. no replacement. Returns the portlet that is reporting its unavailability.
 int getUnavailableSeconds()
          Deprecated. Returns the number of seconds the portlet expects to be temporarily unavailable.
 boolean isPermanent()
          Deprecated. Returns a boolean indicating whether the portlet is permanently unavailable.
 void printStackTrace()
          Deprecated. Prints the stack trace of this exception to the standard error stream.
 void java.io.PrintStream)">printStackTrace(java.io.PrintStream out)
          Deprecated. Prints the stack trace of this exception to the specified print stream.
 void java.io.PrintWriter)">printStackTrace(java.io.PrintWriter out)
          Deprecated. Prints the stack trace of this exception to the specified print writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnavailableException

public UnavailableException(Portlet portlet,
                            java.lang.String msg)
Deprecated. use UnavailableException(String) instead.

Parameters:
portlet - the Portlet instance that is unavailable
msg - a String specifying the descriptive message

UnavailableException

public UnavailableException(int seconds,
                            Portlet portlet,
                            java.lang.String msg)
Deprecated. use UnavailableException(String, int) instead.

Parameters:
seconds - an integer specifying the number of seconds the portlet expects to be unavailable; if zero or negative, indicates that the portlet can't make an estimate
portlet - the Portlet that is unavailable
msg - a String specifying the descriptive message, which can be written to a log file or displayed for the user.

UnavailableException

public UnavailableException(java.lang.String msg)
Deprecated. 
Constructs a new exception with a descriptive message indicating that the portlet is permanently unavailable.

Parameters:
msg - a String specifying the descriptive message

UnavailableException

public UnavailableException(java.lang.String msg,
                            int seconds)
Deprecated. 
Constructs a new exception with a descriptive message indicating that the portlet is temporarily unavailable and giving an estimate of how long it will be unavailable.

In some cases, the portlet cannot make an estimate. For example, the portlet might know that a server it needs is not running, but not be able to report how long it will take to be restored to functionality. This can be indicated with a negative or zero value for the seconds argument.

Parameters:
msg - a String specifying the descriptive message, which can be written to a log file or displayed for the user.
seconds - an integer specifying the number of seconds the portlet expects to be unavailable; if zero or negative, indicates that the portlet can't make an estimate
Method Detail

isPermanent

public boolean isPermanent()
Deprecated. 
Returns a boolean indicating whether the portlet is permanently unavailable. If so, something is wrong with the portlet, and the system administrator must take some corrective action.

Returns:
true if the portlet is permanently unavailable; false if the portlet is available or temporarily unavailable

getPortlet

public Portlet getPortlet()
Deprecated. no replacement. Returns the portlet that is reporting its unavailability.

Returns:
the Portlet object that is throwing the UnavailableException

getUnavailableSeconds

public int getUnavailableSeconds()
Deprecated. 
Returns the number of seconds the portlet expects to be temporarily unavailable.

If this method returns a negative number, the portlet is permanently unavailable or cannot provide an estimate of how long it will be unavailable. No effort is made to correct for the time elapsed since the exception was first reported.

Returns:
an integer specifying the number of seconds the portlet will be temporarily unavailable, or a negative number if the portlet is permanently unavailable or cannot make an estimate

printStackTrace

public void printStackTrace()
Deprecated. 
Prints the stack trace of this exception to the standard error stream.

Overrides:
printStackTrace in class PortletException

java.io.PrintStream)">

printStackTrace

public void printStackTrace(java.io.PrintStream out)
Deprecated. 
Prints the stack trace of this exception to the specified print stream.

Overrides:
java.io.PrintStream)">printStackTrace in class PortletException
Parameters:
out - the PrintStream to use for output

java.io.PrintWriter)">

printStackTrace

public void printStackTrace(java.io.PrintWriter out)
Deprecated. 
Prints the stack trace of this exception to the specified print writer.

Overrides:
java.io.PrintWriter)">printStackTrace in class PortletException
Parameters:
out - the PrintWriter to use for output.