Package uk.ac.starlink.connect
Interface Connector
public interface Connector
Interface for logging in to a remote facility.
- Since:
- 18 Feb 2005
- Author:
- Mark Taylor (Starlink)
-
Method Summary
Modifier and TypeMethodDescriptiongetIcon()Returns an icon which labels this connector.AuthKey[]getKeys()Returns an array of authorization keys whose values are required to attempt a connection.getName()Returns the name of the type of facility to which this connector can connect.Attempts to open a connection.
-
Method Details
-
getName
String getName()Returns the name of the type of facility to which this connector can connect.- Returns:
- connector type
-
getIcon
Icon getIcon()Returns an icon which labels this connector. The icon should preferably be 20x20 pixels. Null may be returned if you have no suitable icon.- Returns:
- icon for this connector
-
getKeys
AuthKey[] getKeys()Returns an array of authorization keys whose values are required to attempt a connection. These will commonly include name and password keys, but there may be others.- Returns:
- authorization keys
-
logIn
Attempts to open a connection. The suppliedauthValuesmap contains an entry for each of the keys returned bygetKeys(), with the entry's value being the value for that key. Thus the values will typically be the user's name, password, etc. The values will be eitherStringorchar[]values ornull(char[]may be used for hidden values for security reasons).- Parameters:
authValues- AuthKey->value map containing connection information- Returns:
- a live connection object
- Throws:
IOException- if there was some error, for instance authorization failure
-