Package uk.ac.starlink.connect

# Class ConnectorManager

java.lang.Object
uk.ac.starlink.connect.ConnectorManager

public class ConnectorManager extends Object
Marshals provision of `Connector` objects.

By default, if the requisite classes are available in this JVM, the following connectors are known:

- `uk.ac.starlink.srb.SRBConnector` (SRB)
- `uk.ac.starlink.astrogrid.AcrConnector` (MySpace)

Since:
  21 Feb 2005
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CONNECTORS_PROPERTY`
Name of property containing colon-separated list of additional `Connector` implementations to be made available from this manager.

## Constructor Summary

Constructors
Constructor
Description
`ConnectorManager()`

## Method Summary

Modifier and Type
Method
Description
`static ConnectorAction[]`
`getConnectorActions()`
Returns a list of all the currently available ConnectorAction objects.
`static Connector[]`
`getConnectors()`
Returns a list of all the known Connector objects.
`static Connection`
`showConnectionDialog(Component parent, Connector connector)`
Pops up a modal dialogue which invites the user to log into a connection using a given connector.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### CONNECTORS_PROPERTY

public static final String CONNECTORS_PROPERTY
Name of property containing colon-separated list of additional `Connector` implementations to be made available from this manager.

See Also:
  - Constant Field Values

## Constructor Details

### ConnectorManager

public ConnectorManager()

## Method Details

### getConnectors

public static Connector[] getConnectors()
Returns a list of all the known Connector objects. This includes any of Connector classes which are known about by default, if the requisite classes are present, as well as any whose classes are named in the `CONNECTORS_PROPERTY` system property.

Returns:
  array of avilable connectors

### getConnectorActions

public static ConnectorAction[] getConnectorActions()
Returns a list of all the currently available ConnectorAction objects. There will be one for each of the `Connector`s returned by `getConnectors()`. Since a `ConnectorAction` holds open a single connection at a time, this is a sensible method to use if you want to get a list of the current connections to various places. If you want to be able to open guaranteed new connections, use `getConnectors` itself instead.

Returns:
  array of connector actions

### showConnectionDialog

public static Connection showConnectionDialog(Component parent, Connector connector)
Pops up a modal dialogue which invites the user to log into a connection using a given connector. The return value will be either a new connection, or null if the user declines to supply correct values. The user will be informed of any errors that occur and invited to retry.

Parameters:
  `parent` - component for the dialogue
  `connector` - connector
Returns:
  new connection, or null