com.mindtree.techworks.insight.download
Class RemoteClientFactory

java.lang.Object
  extended by com.mindtree.techworks.insight.download.RemoteClientFactory

public class RemoteClientFactory
extends java.lang.Object

Returns instances of RemoteClient based on the Fileset passed. The class looks at the Fileset type to determine the RemoteClient to pass.

Version:
$Revision: 27 $ $Date: 2007-12-16 04:58:03 -0700 (Sun, 16 Dec 2007) $
Author:
Bindul Bhowmik
See Also:
Fileset type.

Constructor Summary
RemoteClientFactory()
           
 
Method Summary
static RemoteClient getClientForFileset(Fileset fileset)
          Identifies and returns a client for the fileset provided
static void registerClient(java.lang.String protocolIdentifier, java.lang.Class handlerClass)
          Method to be called on load by all Handlers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteClientFactory

public RemoteClientFactory()
Method Detail

registerClient

public static void registerClient(java.lang.String protocolIdentifier,
                                  java.lang.Class handlerClass)
Method to be called on load by all Handlers. The protocol identifier, should be one from RemoteClientidentifiers.

Parameters:
protocolIdentifier - The protocol identifier
handlerClass - The class handling the protocol

getClientForFileset

public static RemoteClient getClientForFileset(Fileset fileset)
                                        throws RemoteClientException
Identifies and returns a client for the fileset provided

Parameters:
fileset - The fileset to get a client for
Returns:
An instance of RemoteClient to download the files
Throws:
RemoteClientException - If no handler is configured for the protocol in the fileset, or if a client cannot be instantiated.


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.