TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.local.file
Class FileManagerFactory

java.lang.Object
  extended byorg.eclipse.hyades.execution.local.file.FileManagerFactory
All Implemented Interfaces:
IFileManagerFactory

public final class FileManagerFactory
extends java.lang.Object
implements IFileManagerFactory

The file manager factory is the recommended access point for obtaining an instance of the file manager to use. The file manager will begin the starting timeout at a low value and increment it by a constant amount as the new and legacy file server protocol is attempted, if the communication succeeds then the appropriate concrete file manager is created; if the communication fails it will continue alternating between the legacy and new file server protocols until a communication can be made. Each set of attempts will increment the timeout value by a constant value until the maximum amount of query server availability tries is exceeded.


Method Summary
 IFileManagerExtended create(org.eclipse.hyades.internal.execution.local.control.Connection connection)
          Create file manager factory method, uses the entry in the cache if the connection already has a file manager cached -- if a file manager cannot be established due to providers not being able to connect to the file transfer service, null will be returned.
 IFileManagerExtended create(java.net.InetSocketAddress fileServerAddress)
          Create a new extended file manager instance given the file server address to use (this specifies the IP address and the port) -- this is typically used for testing where the agent controller is not necessary up and running, although it can be used instead of the factory method that takes an agent controller connection.
 IFileManagerExtended createTimed(org.eclipse.hyades.internal.execution.local.control.Connection connection, int iterations)
          Creates a file manager used for performance timing measurements
 IFileManagerExtended createTimed(java.net.InetSocketAddress fileServerAddress, int iterations)
          Create a new timed file manager for the client to use in timed mode
static IFileManagerFactory getInstance()
          Singleton accessor method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IFileManagerFactory getInstance()
Singleton accessor method

Returns:

create

public IFileManagerExtended create(org.eclipse.hyades.internal.execution.local.control.Connection connection)
                            throws org.eclipse.hyades.internal.execution.core.file.ServerNotAvailableException
Create file manager factory method, uses the entry in the cache if the connection already has a file manager cached -- if a file manager cannot be established due to providers not being able to connect to the file transfer service, null will be returned.

Specified by:
create in interface IFileManagerFactory
Parameters:
connection - connection to use for this file manager instance
Returns:
the extended file manager interface to operate on, null if none could be found
Throws:
org.eclipse.hyades.internal.execution.core.file.ServerNotAvailableException

create

public IFileManagerExtended create(java.net.InetSocketAddress fileServerAddress)
Create a new extended file manager instance given the file server address to use (this specifies the IP address and the port) -- this is typically used for testing where the agent controller is not necessary up and running, although it can be used instead of the factory method that takes an agent controller connection.

Specified by:
create in interface IFileManagerFactory
Parameters:
fileServerAddress - address and port information for server
Returns:
the configured file manager
See Also:
create(Connection)

createTimed

public IFileManagerExtended createTimed(org.eclipse.hyades.internal.execution.local.control.Connection connection,
                                        int iterations)
                                 throws org.eclipse.hyades.internal.execution.core.file.ServerNotAvailableException
Creates a file manager used for performance timing measurements

Specified by:
createTimed in interface IFileManagerFactory
Parameters:
connection - the connection to the agent controller
iterations - the number of times each method will be exercised per invocation in
Returns:
the file manager configured to use
Throws:
org.eclipse.hyades.internal.execution.core.file.ServerNotAvailableException

createTimed

public IFileManagerExtended createTimed(java.net.InetSocketAddress fileServerAddress,
                                        int iterations)
Description copied from interface: IFileManagerFactory
Create a new timed file manager for the client to use in timed mode

Specified by:
createTimed in interface IFileManagerFactory
Parameters:
fileServerAddress - address and port information for server
iterations - the number of times each method invocation will be called
Returns:
the configured file manager

TPTP 4.2.0 Platform Project
Public API Specification