Package uk.ac.starlink.connect
Interface Connector
-
public interface ConnectorInterface for logging in to a remote facility.- Since:
- 18 Feb 2005
- Author:
- Mark Taylor (Starlink)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.IcongetIcon()Returns an icon which labels this connector.AuthKey[]getKeys()Returns an array of authorization keys whose values are required to attempt a connection.java.lang.StringgetName()Returns the name of the type of facility to which this connector can connect.ConnectionlogIn(java.util.Map<AuthKey,?> authValues)Attempts to open a connection.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the type of facility to which this connector can connect.- Returns:
- connector type
-
getIcon
javax.swing.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
Connection logIn(java.util.Map<AuthKey,?> authValues) throws java.io.IOException
Attempts to open a connection. The supplied authValues map 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 either String or char[] values or null (char[] may be used for hidden values for security reasons).- Parameters:
authValues- AuthKey->value map containing connection information- Returns:
- a live connection object
- Throws:
java.io.IOException- if there was some error, for instance authorization failure
-
-