4.6.15 UnavailableException

This exception is thrown if the portlet fails to initialize. Generally, your portlets will include an init method which calls the super.init. Since this call may produce an UnavailableException, the functionality is provided to evaluate what to do if the initialization fails.

getUnavailableSeconds: this method returns an int (integer) indicating how long this portlet is unavailable for.

isPermament: this method returns a boolean indicating this portlet is not permanently unavailable.

The length of time the portlet is unavailable is determined when the exception is first created.

UnavailableException(String msg): this constructor indicates the portlet is permanently unavailable.

UnavailableException(String msg, int time): this constructor will reflect the length of time for which this portlet is unavailable.

Redbooks
ibm.com/redbooks