|
TPTP 4.6.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.hyades.internal.execution.core.file.FileServerCommandFactory
public final class FileServerCommandFactory
Used by the client and server side of the file manager implementation to create commands that encapsulate the state and behavior associated with a particular action that should be conducted.
There is a maintained singleton on the server and a qualified set of instances on the client side per address and port combination. The current supports commands are gathered from the public interface to the file server command factory.
This class encapsulates the client side connection to the server, figuring out the proper port to use to initiate file server commands and whether to create new or reuse existing sockets. In server operation, this factory will operate on the socket channels that are passed-in per call and not keep the server running -- this is done in the file server extended class.
There is also a polymorphic create method that will create a command based on the fully-qualified Java class name; this is used on the server-side to create commands based on the comman identity that is sent over the wire.
FileServerExtended,
FileManagerExtendedImpl,
#createDeleteFileCommand(Cookie, IProgressMonitor),
#createDeleteFileCommand(FileIdentifierList, IProgressMonitor),
#createGetFileCommand(Cookie, FileIdentifierList, FileIdentifierList,
Option[], IProgressMonitor),
#createListContentCommand(FileIdentifierList, IProgressMonitor),
#createModifyPermissionCommand(FileIdentifierList, String,
IProgressMonitor),
#createPutFileCommand(Cookie, FileIdentifierList, FileIdentifierList,
Option[], IProgressMonitor),
createQueryServerStatusCommand()| Method Summary | |
|---|---|
IDeleteDirectoryCommand |
createDeleteDirectoryCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create delete directory command for use by file transfer service clients |
IDeleteFileCommand |
createDeleteFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.Cookie cookie,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create delete file command for use by file transfer service clients |
IDeleteFileCommand |
createDeleteFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create delete file command for use by file transfer service clients |
IFileServerCommand |
createFileServerCommand(java.lang.String identity,
ISocketChannel clientChannel)
Create a file server command to be used by the file transfer service server, all server-side hosted file server commands are created through this method -- the appropriate command to create is identified by the identity argument passed in. |
IGetFileCommand |
createGetFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList localIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.Option[] options,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create get file command for use by file transfer service clients |
IListContentCommand |
createListContentCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create list content command for use by file transfer service clients, used to list the content of a directory or folder on the remote server |
IModifyPermissionCommand |
createModifyPermissionCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
java.lang.String permissionDirective,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create modify permission command for use by file transfer service clients, used to modify the permissions of files on the remote file server |
IPutFileCommand |
createPutFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.Cookie cookie,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList localIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.Option[] options,
org.eclipse.core.runtime.IProgressMonitor monitor)
Create put file command for use by file transfer service clients |
IQueryServerStatusCommand |
createQueryServerStatusCommand()
Create query server status command for use by file transfer service clients, used to query the status of the file server, a simple echo test or equivalent is used as a simple sanity test |
static IFileServerCommandFactory |
getInstance()
Singleton instance used by file server, no address is needed since its the server |
static IFileServerCommandFactory |
getInstance(org.eclipse.hyades.execution.core.file.IFileLocation fileServerLocation)
A pool of factories is kept, qualified by the address of the server |
void |
reset()
Resets any appropriate resources or connections associated with this factory, cleans out the state as if the factory instance was constructed new |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static IFileServerCommandFactory getInstance()
public static IFileServerCommandFactory getInstance(org.eclipse.hyades.execution.core.file.IFileLocation fileServerLocation)
fileServerLocation - the location and other important information qualifying the
exact file server host to use
public IDeleteDirectoryCommand createDeleteDirectoryCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws ServerNotAvailableException
IFileServerCommandFactory
createDeleteDirectoryCommand in interface IFileServerCommandFactoryremoteIdentifiers - the identifiers on the remote server to be deletedmonitor - progress monitor for the delete directory command
ServerNotAvailableException
public IDeleteFileCommand createDeleteFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.Cookie cookie,
org.eclipse.core.runtime.IProgressMonitor monitor)
IFileServerCommandFactory
createDeleteFileCommand in interface IFileServerCommandFactorycookie - the cookie to use for identifying the associated file
operation that created files, a cookie used for a put file
command for example, can then be used to pass in the delete
file command -- this will then result in the delete command
deleting only the files that were created during the put file
command operation, the cookie identifies which files to remove
via the remote server processmonitor - progress monitor for the delete file command
public IDeleteFileCommand createDeleteFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws ServerNotAvailableException
IFileServerCommandFactory
createDeleteFileCommand in interface IFileServerCommandFactoryremoteIdentifiers - the identifiers on the remote server to be deletedmonitor - progress monitor for the delete file command
ServerNotAvailableException
public IFileServerCommand createFileServerCommand(java.lang.String identity,
ISocketChannel clientChannel)
throws InvalidFileServerCommandException
IFileServerCommandFactory
createFileServerCommand in interface IFileServerCommandFactoryidentity - the identity of the command to create on the serverclientChannel - the channel to use to communicate with the client from the
server
InvalidFileServerCommandException#createFileServerCommand(String, ISocketChannel, ClassLoader)
public IGetFileCommand createGetFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList localIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.Option[] options,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws ServerNotAvailableException
IFileServerCommandFactory
createGetFileCommand in interface IFileServerCommandFactorylocalIdentifiers - the identifiers of the files to be created locally, the
destination file identifiers for the transferremoteIdentifiers - the identifiers of the files to be transferred from the remote
server to the local client, the source file identifiers for
the transferoptions - options to configure the get file command behaviormonitor - progress monitor for the get file command operation
ServerNotAvailableException
public IListContentCommand createListContentCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.core.runtime.IProgressMonitor monitor)
IFileServerCommandFactory
createListContentCommand in interface IFileServerCommandFactoryremoteIdentifiers - identifies the directories to list the contents ofmonitor - progress monitor for the list content command
public IModifyPermissionCommand createModifyPermissionCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
java.lang.String permissionDirective,
org.eclipse.core.runtime.IProgressMonitor monitor)
IFileServerCommandFactory
createModifyPermissionCommand in interface IFileServerCommandFactoryremoteIdentifiers - the remote identifiers to affect with the modify permission
command's operationpermissionDirective - the permission directives to affect the filesmonitor - progress monitor for the modify permission command
public IPutFileCommand createPutFileCommand(org.eclipse.hyades.execution.core.file.IFileManagerExtended.Cookie cookie,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList localIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.FileIdentifierList remoteIdentifiers,
org.eclipse.hyades.execution.core.file.IFileManagerExtended.Option[] options,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws ServerNotAvailableException
IFileServerCommandFactory
createPutFileCommand in interface IFileServerCommandFactorycookie - the cookie to use for identifying the instance of the command
between client and server, for example, the cookie represents
an instance of the command on the client and can then be
associated with the command on the server that is associated
with the same operationlocalIdentifiers - the identifiers of the files to be sent to the remote server,
the source file identifiers in this operationremoteIdentifiers - the identifiers of the files to be created on the remote
server process, the destination file identifiers in the
operationoptions - options to configure the put file command behaviormonitor - progress monitor for the put file command
ServerNotAvailableException
public IQueryServerStatusCommand createQueryServerStatusCommand()
throws ServerNotAvailableException
IFileServerCommandFactory
createQueryServerStatusCommand in interface IFileServerCommandFactoryServerNotAvailableExceptionpublic void reset()
IFileServerCommandFactory
reset in interface IFileServerCommandFactory
|
TPTP 4.6.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||