com.sodius.mdw.core.model.io
Interface ConnectorContext

All Superinterfaces:
PropertySet

public interface ConnectorContext
extends PropertySet

Describes the context in which a connector runs. This interface provides access to various elements which help to implement a model reader/writer.

This interface is not intended to be implemented by clients.


Method Summary
 ConnectorDescriptor getConnectorDescriptor()
          Returns the descriptor which details the properties of this connector.
 Logger getLogger()
          Returns the logger used to report errors and warnings, as well as debugging information.
 ProgressMonitor getProgressMonitor()
          Returns the monitor used to report progress and to check for cancellation.
 MDWorkbench getWorkbench()
          Returns the workbench, which may be used to access configuration properties.
 
Methods inherited from interface com.sodius.mdw.core.util.PropertySet
getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyNames, setProperty, setProperty, setProperty, setProperty, setProperty
 

Method Detail

getConnectorDescriptor

ConnectorDescriptor getConnectorDescriptor()
Returns the descriptor which details the properties of this connector.

The connector descriptor can be helpful to access connector specific properties and to load related resources.

Returns:
the connector descriptor.
See Also:
ConnectorDescriptor.getProperty(String), ConnectorDescriptor.getConfiguration()

getProgressMonitor

ProgressMonitor getProgressMonitor()
Returns the monitor used to report progress and to check for cancellation.

A connector implementation is expected to check regularly whether the process is canceled, in which case it should abort as soon as possible its activity. You may throw an OperationCanceledException to interrupt the reader/writer.

Returns:
the progress monitor.
See Also:
ProgressMonitor.isCanceled(), OperationCanceledException

getLogger

Logger getLogger()
Returns the logger used to report errors and warnings, as well as debugging information.

Returns:
the logger.

getWorkbench

MDWorkbench getWorkbench()
Returns the workbench, which may be used to access configuration properties. The workbench configuration provides for example access to the command line that launched the workbench, and can determine whether the workbench runs in headless (no user interface) mode.

Returns:
the workbench.
See Also:
WorkbenchConfiguration.getCommandLine(), WorkbenchConfiguration.isHeadless()