nl.uva.vlet.vrs
Class VRS

java.lang.Object
  extended by nl.uva.vlet.vrs.VRS
Direct Known Subclasses:
HTTPRS, VFS, VJS

public abstract class VRS
extends java.lang.Object

Toplevel Virtual Resource class.


Field Summary
static java.lang.String ATTR_AUTH_SCHEME
           
static java.lang.String ATTR_HOSTNAME
           
static java.lang.String ATTR_ID
           
static java.lang.String ATTR_PASSPHRASE
          pass phrase property when opening a new connection
static java.lang.String ATTR_PASSWORD
          passwd property when opening a new connection
static java.lang.String ATTR_PORT
           
static java.lang.String ATTR_SCHEME
          scheme type
static java.lang.String ATTR_USERNAME
           
static int DEFAULT_GRIDFTP_PORT
           
static int DEFAULT_SSH_PORT
           
static java.lang.String DIR_TYPE
           
static java.lang.String FILE_SCHEME
           
static java.lang.String FILE_TYPE
           
static java.lang.String GFTP_SCHEME
           
static java.lang.String HTTP_SCHEME
           
static java.lang.String HTTPS_SCHEME
           
static java.lang.String LINK_TYPE
           
static java.lang.String LOCALHOST
          'localhost' constant
static long MAX_CONTENTS_SIZE
          Maximum file size to read at once into memory when using getContents()
static java.lang.String MYVLE_SCHEME
           
static java.lang.String MYVLE_TYPE
           
static java.lang.String RFTS_JOB_TYPE
           
static java.lang.String RFTS_SCHEME
          The 'rfts' scheme isn't a real protocol, but currently used as experimental 'service'
static java.lang.String RFTS_SERVER_TYPE
           
static java.lang.String RFTS_TRANSFER_TYPE
           
static java.lang.String SERVER_TYPE
           
static java.lang.String SFTP_SCHEME
           
static java.lang.String SRB_SCHEME
           
static java.lang.String VLINK_EXTENSION
          ".vlink" for saved shortcut/link nodes
 
Constructor Summary
VRS()
          Enforce public constructor for subclasses !
 
Method Summary
 ServerInfo checkUpdateServerInfo(ServerInfo info, VRL loc, boolean autoCreate)
          Check and update the ServerInfo object or create a new one.
abstract  void clear()
          Instead of a dispose() method, a VRS has a clear() method, where it cleans up all cached objects/servers.
 VAttribute[] getDefaultServerAttributes()
          Get default Server Attributes.
abstract  java.lang.String getName()
          Returns name of service, for example GridFTP
abstract  java.lang.String[] getResourceTypes()
          Returns list of Resources or Child types.
abstract  java.lang.String[] getSchemeNames()
          Returns list of service types it support.This is the protocol part in an URI.
 VNode openLocation(VRSContext context, java.lang.String location)
          Returns handler object (VNode) specified by the location string
abstract  VNode openLocation(VRSContext context, VRL location)
          Returns handler object (VNode) specified by the VRL (URI)
 void performAction(VRSContext vrsContext, java.lang.String string, VRL source, VRL dest)
          Current generic interface to perform a implementation specific method.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MYVLE_TYPE

public static final java.lang.String MYVLE_TYPE
See Also:
Constant Field Values

SERVER_TYPE

public static final java.lang.String SERVER_TYPE
See Also:
Constant Field Values

LINK_TYPE

public static final java.lang.String LINK_TYPE
See Also:
Constant Field Values

FILE_TYPE

public static final java.lang.String FILE_TYPE
See Also:
Constant Field Values

DIR_TYPE

public static final java.lang.String DIR_TYPE
See Also:
Constant Field Values

VLINK_EXTENSION

public static final java.lang.String VLINK_EXTENSION
".vlink" for saved shortcut/link nodes

See Also:
Constant Field Values

LOCALHOST

public static final java.lang.String LOCALHOST
'localhost' constant

See Also:
Constant Field Values

ATTR_SCHEME

public static final java.lang.String ATTR_SCHEME
scheme type

See Also:
Constant Field Values

ATTR_PASSWORD

public static final java.lang.String ATTR_PASSWORD
passwd property when opening a new connection

See Also:
Constant Field Values

ATTR_PASSPHRASE

public static final java.lang.String ATTR_PASSPHRASE
pass phrase property when opening a new connection

See Also:
Constant Field Values

ATTR_USERNAME

public static final java.lang.String ATTR_USERNAME
See Also:
Constant Field Values

ATTR_HOSTNAME

public static final java.lang.String ATTR_HOSTNAME
See Also:
Constant Field Values

ATTR_PORT

public static final java.lang.String ATTR_PORT
See Also:
Constant Field Values

ATTR_ID

public static final java.lang.String ATTR_ID
See Also:
Constant Field Values

FILE_SCHEME

public static final java.lang.String FILE_SCHEME
See Also:
Constant Field Values

HTTP_SCHEME

public static final java.lang.String HTTP_SCHEME
See Also:
Constant Field Values

HTTPS_SCHEME

public static final java.lang.String HTTPS_SCHEME
See Also:
Constant Field Values

SRB_SCHEME

public static final java.lang.String SRB_SCHEME
See Also:
Constant Field Values

GFTP_SCHEME

public static final java.lang.String GFTP_SCHEME
See Also:
Constant Field Values

SFTP_SCHEME

public static final java.lang.String SFTP_SCHEME
See Also:
Constant Field Values

MYVLE_SCHEME

public static final java.lang.String MYVLE_SCHEME
See Also:
Constant Field Values

RFTS_SCHEME

public static final java.lang.String RFTS_SCHEME
The 'rfts' scheme isn't a real protocol, but currently used as experimental 'service'

See Also:
Constant Field Values

ATTR_AUTH_SCHEME

public static final java.lang.String ATTR_AUTH_SCHEME
See Also:
Constant Field Values

RFTS_JOB_TYPE

public static final java.lang.String RFTS_JOB_TYPE
See Also:
Constant Field Values

RFTS_SERVER_TYPE

public static final java.lang.String RFTS_SERVER_TYPE
See Also:
Constant Field Values

RFTS_TRANSFER_TYPE

public static final java.lang.String RFTS_TRANSFER_TYPE
See Also:
Constant Field Values

MAX_CONTENTS_SIZE

public static final long MAX_CONTENTS_SIZE
Maximum file size to read at once into memory when using getContents()

See Also:
Constant Field Values

DEFAULT_GRIDFTP_PORT

public static final int DEFAULT_GRIDFTP_PORT
See Also:
Constant Field Values

DEFAULT_SSH_PORT

public static final int DEFAULT_SSH_PORT
See Also:
Constant Field Values
Constructor Detail

VRS

public VRS()
Enforce public constructor for subclasses !

Method Detail

openLocation

public VNode openLocation(VRSContext context,
                          java.lang.String location)
                   throws VlException
Returns handler object (VNode) specified by the location string

Throws:
VlException

openLocation

public abstract VNode openLocation(VRSContext context,
                                   VRL location)
                            throws VlException
Returns handler object (VNode) specified by the VRL (URI)

Throws:
VlException

getName

public abstract java.lang.String getName()
Returns name of service, for example GridFTP


getSchemeNames

public abstract java.lang.String[] getSchemeNames()
Returns list of service types it support.This is the protocol part in an URI. For example 'localfs' or 'file' for localfs:/// or 'srb' for srb:///


getResourceTypes

public abstract java.lang.String[] getResourceTypes()
Returns list of Resources or Child types. For example "File" or "Dir". No Abstract type may be retuned here like VFile or VDir.


performAction

public void performAction(VRSContext vrsContext,
                          java.lang.String string,
                          VRL source,
                          VRL dest)
                   throws VlException
Current generic interface to perform a implementation specific method. This method will be revised in the future.

Parameters:
vrsContext -
string -
source -
dest -
Throws:
VlException

checkUpdateServerInfo

public ServerInfo checkUpdateServerInfo(ServerInfo info,
                                        VRL loc,
                                        boolean autoCreate)
                                 throws VlException
Check and update the ServerInfo object or create a new one. Must always return the update ServerInfo. if autoCreate==false, this method might return NULL.

new ServerInfo(getDefaultServerAttributes);

Throws:
VlException

getDefaultServerAttributes

public VAttribute[] getDefaultServerAttributes()
Get default Server Attributes. When creating a new Resource in the VBrowser, these attributes will be added to the Resource and made customizable from the 'properties' menu. The ServerInfo class automatically adds new attributes if they aren't stored yet in the ServerInfo by calling this method and matching optional missing Server Attributes. This allows for auto-upgrading stored (saved) server attributes.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clear

public abstract void clear()
Instead of a dispose() method, a VRS has a clear() method, where it cleans up all cached objects/servers. This method can be used before a dispose, but also can be used to clean up memory and/or reset server connections completely. Expect to reconnect again after this method has been invoked.