uk.ac.starlink.srb
Class SRBConnector

java.lang.Object
  extended by uk.ac.starlink.srb.SRBConnector
All Implemented Interfaces:
Connector

public class SRBConnector
extends Object
implements Connector

Connector for connecting to Storage Resource Broker filestores. The default information is taken from information in the user's ~/.srb directory if it exists.

Since:
7 Mar 2005
Author:
Mark Taylor (Starlink)

Constructor Summary
SRBConnector()
           
 
Method Summary
 Icon getIcon()
          Returns an icon which labels this connector.
 AuthKey[] getKeys()
          Returns an array of authorization keys whose values are required to attempt a connection.
 String getName()
          Returns the name of the type of facility to which this connector can connect.
 Connection logIn(Map authValues)
          Attempts to open a connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRBConnector

public SRBConnector()
Method Detail

getIcon

public Icon getIcon()
Description copied from interface: Connector
Returns an icon which labels this connector. The icon should preferably be 20x20 pixels. Null may be returned if you have no suitable icon.

Specified by:
getIcon in interface Connector
Returns:
icon for this connector

getName

public String getName()
Description copied from interface: Connector
Returns the name of the type of facility to which this connector can connect.

Specified by:
getName in interface Connector

getKeys

public AuthKey[] getKeys()
Description copied from interface: Connector
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.

Specified by:
getKeys in interface Connector
Returns:
authorization keys

logIn

public Connection logIn(Map authValues)
                 throws IOException
Description copied from interface: Connector
Attempts to open a connection. The supplied authValues map contains an entry for each of the keys returned by Connector.getKeys(), 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).

Specified by:
logIn in interface Connector
Parameters:
authValues - AuthKey->value map containing connection information
Returns:
a live connection object
Throws:
IOException - if there was some error, for instance authorization failure


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.