| java.lang.Object net.refractions.udig.catalog.ui.IConnectionErrorHandler
IConnectionErrorHandler | abstract public class IConnectionErrorHandler (Code) | | A class which is used to handle an error which occurs when attempting to connection to a service.
Connection error handlers have the following responsibilites:
- Determining from a throwable object, if they can handle the error.
- Providing a ui which provides feedback about an error, and possibly a way to recover from
it.
Connection error handlers are contributed by extending the
net.refractions.catalog.ui.connectionErrorHandler extension point.
Subclasses may overide the following methods.
- canHandle(Throwable)
- canRecover()
- create(Composite)
author: Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net |
Method Summary | |
abstract public boolean | canHandle(IService service, Throwable t) Determines if the handler can handle the error in question.
Parameters: t - The error in question. | public boolean | canRecover() Determines if the handler has the ability to recover from the error so that another
connection may be attempted. | abstract protected Control | create(Composite parent) | public void | createControl(Composite parent) Creates the control used by the handler to provide feedback / recover from the error. | public Control | getControl() | public String | getName() Return the name of the handler. | public IService | getService() | public Throwable | getThrowable() | public boolean | isComplete() Determines if the handler is done handling the error, and another connection may be
attempted. | public void | recover(IProgressMonitor monitor) This method is called in the event in which a handler can recover from a connection error. | public void | setName(String name) Sets the name for the handler. | public void | setService(IService service) | public void | setThrowable(Throwable t) Sets the error being handled. |
XPID | final public static String XPID(Code) | | extension point id *
|
canHandle | abstract public boolean canHandle(IService service, Throwable t)(Code) | | Determines if the handler can handle the error in question.
Parameters: t - The error in question. True if the handler can handle, otherwise false. |
canRecover | public boolean canRecover()(Code) | | Determines if the handler has the ability to recover from the error so that another
connection may be attempted.
True if the handler will try to recover, otherwise false. |
create | abstract protected Control create(Composite parent)(Code) | | Parameters: parent - |
createControl | public void createControl(Composite parent)(Code) | | Creates the control used by the handler to provide feedback / recover from the error.
Parameters: parent - The parent widget. |
getControl | public Control getControl()(Code) | | the control used by the handler to provide feedback / recover from the error. |
getName | public String getName()(Code) | | Return the name of the handler. This name will be used to identify the handler in cases where
multiple handlers may wish to handle a single error.
The name of the handler. |
getService | public IService getService()(Code) | | the service being connected to. |
isComplete | public boolean isComplete()(Code) | | Determines if the handler is done handling the error, and another connection may be
attempted. If the handler does not have the ability to recover from a connection error (ie.
canRecover() return false), this method should return false.
true if the error has been handled, otherwise. |
recover | public void recover(IProgressMonitor monitor) throws IOException(Code) | | This method is called in the event in which a handler can recover from a connection error.
This method blocks and allows the handler to make remote connections.
Parameters: monitor - A progress monitor. throws: IOException - |
setName | public void setName(String name)(Code) | | Sets the name for the handler. This name will be used to identify the handler in cases where
multiple handlers may wish to handle a single error.
Parameters: name - The name of the handler. |
setService | public void setService(IService service)(Code) | | Parameters: service - The service being connected to. |
setThrowable | public void setThrowable(Throwable t)(Code) | | Sets the error being handled.
Parameters: t - The throwable object representing the error. |
|
|