Package | Description |
---|---|
nl.esciencecenter.xenon |
This package is the main entry point into the Xenon API.
|
nl.esciencecenter.xenon.credentials |
This package contains classes and interfaces for managing credentials.
|
nl.esciencecenter.xenon.files |
This package contains classes and interfaces for manipulating files.
|
nl.esciencecenter.xenon.jobs |
This package contains the classes and interfaces used to run jobs.
|
nl.esciencecenter.xenon.util |
This package is contains several utility classes.
|
Modifier and Type | Class and Description |
---|---|
class |
IncompatibleVersionException
Signals that an adaptor is unable to connect to a resource due to version problems.
|
class |
InvalidCredentialException
Signals that an invalid credential was used to access a resource.
|
class |
InvalidLocationException
Signals that an invalid location was provided.
|
class |
InvalidPropertyException
Signals that a property has an invalid value.
|
class |
InvalidSchemeException
Signals that an invalid scheme was provided.
|
class |
NoSuchXenonException
Signals that a unknown Xenon instance was provided.
|
class |
UnknownPropertyException
Signals that an unknown property was provided.
|
Modifier and Type | Method and Description |
---|---|
static void |
XenonFactory.endXenon(Xenon xenon)
Ends a Xenon instance.
|
AdaptorStatus |
Xenon.getAdaptorStatus(String adaptorName)
Returns information about the specified adaptor.
|
static Xenon |
XenonFactory.newXenon(Map<String,String> properties)
Create a new Xenon instance using the given properties.
|
Modifier and Type | Class and Description |
---|---|
class |
CertificateNotFoundException
Signals that a certificate file could not be found.
|
Modifier and Type | Method and Description |
---|---|
void |
Credentials.close(Credential credential)
Close a Credential
|
Credential |
Credentials.getDefaultCredential(String scheme)
Creates a default credential for the given scheme.
|
boolean |
Credentials.isOpen(Credential credential)
Test if a Credential is open.
|
Credential |
Credentials.newCertificateCredential(String scheme,
String certfile,
String username,
char[] password,
Map<String,String> properties)
Constructs a certificate Credential.
|
Credential |
Credentials.newPasswordCredential(String scheme,
String username,
char[] password,
Map<String,String> properties)
Constructs a password credential.
|
Modifier and Type | Class and Description |
---|---|
class |
AttributeNotSupportedException
Signals that a requested file attribute is not supported by the underlying file system implementation.
|
class |
DirectoryNotEmptyException
Signals that directory is not empty.
|
class |
IllegalSourcePathException
Signals that the source path of an operation is invalid.
|
class |
IllegalTargetPathException
Signals that the target path of an operation is invalid.
|
class |
InvalidCopyOptionsException
Signals that an invalid combination of CopyOptions have been specified.
|
class |
InvalidOpenOptionsException
Signals that an invalid combination of OpenOptions have been specified.
|
class |
InvalidResumeTargetException
Signals that the data in the target of a resume does not match the data in the source.
|
class |
NoSuchCopyException
Signals that a unknown Copy handle was provided.
|
class |
NoSuchPathException
Signals that a path does not exists.
|
class |
PathAlreadyExistsException
Signals that a path already exists.
|
Modifier and Type | Method and Description |
---|---|
CopyStatus |
Files.cancelCopy(Copy copy)
Cancel a copy operation.
|
void |
Files.close(FileSystem filesystem)
Close a FileSystem.
|
Copy |
Files.copy(Path source,
Path target,
CopyOption... options)
Copy an existing source file or symbolic link to a target file.
|
void |
Files.createDirectories(Path dir)
Creates a new directory, failing if the directory already exists.
|
void |
Files.createDirectory(Path dir)
Creates a new directory, failing if the directory already exists.
|
void |
Files.createFile(Path path)
Creates a new empty file, failing if the file already exists.
|
void |
Files.delete(Path path)
Deletes an existing path.
|
boolean |
Files.exists(Path path)
Tests if a path exists.
|
FileAttributes |
Files.getAttributes(Path path)
Get the
FileAttributes of an existing path. |
CopyStatus |
Files.getCopyStatus(Copy copy)
Retrieve the status of an asynchronous copy.
|
boolean |
Files.isOpen(FileSystem filesystem)
Test is a FileSystem is open.
|
void |
Files.move(Path source,
Path target)
Move or rename an existing source path to a non-existing target path.
|
DirectoryStream<PathAttributesPair> |
Files.newAttributesDirectoryStream(Path dir)
Create a DirectoryStream that iterates over all PathAttributePair entries in the directory
dir . |
DirectoryStream<PathAttributesPair> |
Files.newAttributesDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Create a DirectoryStream that iterates over all PathAttributePair entries in the directory
dir that are
accepted by the filter. |
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir)
Create a DirectoryStream that iterates over all entries in the directory
dir . |
DirectoryStream<Path> |
Files.newDirectoryStream(Path dir,
DirectoryStream.Filter filter)
Create a DirectoryStream that iterates over all entries in the directory
dir that are accepted by the filter. |
FileSystem |
Files.newFileSystem(String scheme,
String location,
Credential credential,
Map<String,String> properties)
Create a new FileSystem that represents a (possibly remote) data store at the
location , using the
scheme and credentials to get access. |
InputStream |
Files.newInputStream(Path path)
Open an existing file and return an
InputStream to read from this file. |
OutputStream |
Files.newOutputStream(Path path,
OpenOption... options)
Open an file and return an
OutputStream to write to this file. |
Path |
Files.newPath(FileSystem filesystem,
RelativePath location)
Create a new Path that represents a (possibly non existing) location on
filesystem. |
Path |
Files.readSymbolicLink(Path link)
Reads the target of a symbolic link (optional operation).
|
void |
Files.setPosixFilePermissions(Path path,
Set<PosixFilePermission> permissions)
Sets the POSIX permissions of a path.
|
Modifier and Type | Class and Description |
---|---|
class |
IncompleteJobDescriptionException
Signals that a JobDescription is missing required options.
|
class |
InvalidJobDescriptionException
Signals that a JobDescription contains invalid values for certain options.
|
class |
JobCanceledException
Signals that a jobs has been canceled by the user.
|
class |
NoSuchJobException
Signals that a Job was not found.
|
class |
NoSuchQueueException
Signals that a unknown queue was provided.
|
class |
NoSuchSchedulerException
Signals that a unknown scheduler was provided.
|
class |
UnsupportedJobDescriptionException
Signals that a combination of options used in a JobDescription is not supported by a resource.
|
Modifier and Type | Method and Description |
---|---|
JobStatus |
Jobs.cancelJob(Job job)
Cancel a job.
|
void |
Jobs.close(Scheduler scheduler)
Close a Scheduler.
|
String |
Jobs.getDefaultQueueName(Scheduler scheduler)
Get the name of the default queue for the
scheduler . |
Job[] |
Jobs.getJobs(Scheduler scheduler,
String... queueNames)
Get all jobs currently in (one ore more) queues of
scheduler . |
JobStatus |
Jobs.getJobStatus(Job job)
Get the status of a Job.
|
QueueStatus |
Jobs.getQueueStatus(Scheduler scheduler,
String queueName)
Get the status of the
queue of scheduler . |
QueueStatus[] |
Jobs.getQueueStatuses(Scheduler scheduler,
String... queueNames)
Get the status of all
queues of scheduler . |
Streams |
Jobs.getStreams(Job job)
Returns the standard streams of a job.
|
boolean |
Jobs.isOpen(Scheduler scheduler)
Test if a Scheduler is open.
|
Scheduler |
Jobs.newScheduler(String scheme,
String location,
Credential credential,
Map<String,String> properties)
Create a new Scheduler that represents a (possibly remote) job scheduler at the
location , using the
scheme and credentials to get access. |
Job |
Jobs.submitJob(Scheduler scheduler,
JobDescription description)
Submit a job to a Scheduler.
|
JobStatus |
Jobs.waitUntilDone(Job job,
long timeout)
Wait until a job is done or until a timeout expires.
|
JobStatus |
Jobs.waitUntilRunning(Job job,
long timeout)
Wait for as long a job is waiting in a queue, or until a timeout expires.
|
Modifier and Type | Method and Description |
---|---|
FileVisitResult |
FileVisitor.postVisitDirectory(Path dir,
XenonException exception,
Files files)
Invoked for a directory after entries in the directory, and all of their descendants, have been visited.
|
FileVisitResult |
FileVisitor.visitFileFailed(Path file,
XenonException exception,
Files files)
Invoked for a file that could not be visited.
|
Modifier and Type | Method and Description |
---|---|
void |
Sandbox.addDownloadFile(String src,
Path dest)
Add a file to the list of files to download.
|
void |
Sandbox.addUploadFile(Path src)
Add a file to the list of files to upload.
|
void |
Sandbox.addUploadFile(Path src,
String dest)
Add a file to the list of files to upload.
|
static long |
Utils.copy(Files files,
InputStream in,
Path target,
boolean truncate)
Copies all bytes from an input stream to a file.
|
static long |
Utils.copy(Files files,
Path source,
OutputStream out)
Copies all bytes from a file to an output stream.
|
void |
Sandbox.delete()
Recursively delete the sandbox.
|
void |
Sandbox.download(CopyOption... options)
Download files from sandbox.
|
static Path |
Utils.fromLocalPath(Files files,
String path)
Takes the String representation of a local path (for example "/bin/foo" or "C:\dir\test.txt") and converts it into a
Path . |
static String |
Utils.getCWD()
Return the current working directory as a String.
|
static String |
Utils.getHome()
Return the home directory of the current user as a String.
|
static Path |
Utils.getLocalCWD(Files files)
Returns a
Path that represents the current working directory. |
static FileSystem[] |
Utils.getLocalFileSystems(Files files)
Returns all local FileSystems.
|
static Path |
Utils.getLocalHome(Files files)
Returns a
Path that represents the home directory of the current user. |
static String |
Utils.getLocalRoot(String path)
Return the locally valid root element of an
String representation of an absolute path. |
static Scheduler |
Utils.getLocalScheduler(Jobs jobs)
Returns a
Scheduler that can be used to run jobs locally. |
static RelativePath |
Utils.getRelativePath(String path,
String root)
Provided with an absolute
path and a root , this method returns a RelativePath that
represents the part of path that is realtive to the root . |
static BufferedReader |
Utils.newBufferedReader(Files files,
Path source,
Charset cs)
Opens a file for reading, returning a
BufferedReader that may be used to read text from the file in an
efficient manner. |
static BufferedWriter |
Utils.newBufferedWriter(Files files,
Path target,
Charset cs,
boolean truncate)
Opens or creates a file for writing, returning a BufferedWriter that may be used to write text to the file in an efficient
manner.
|
static Scheduler |
Utils.newScheduler(Jobs jobs,
String scheme)
Create a
Scheduler for the given scheme, but without using a location, credential, or properties. |
FileVisitResult |
FileVisitor.postVisitDirectory(Path dir,
XenonException exception,
Files files)
Invoked for a directory after entries in the directory, and all of their descendants, have been visited.
|
FileVisitResult |
FileVisitor.preVisitDirectory(Path dir,
FileAttributes attributes,
Files files)
Invoked for a directory before entries in the directory are visited.
|
static byte[] |
Utils.readAllBytes(Files files,
Path source)
Read all the bytes from a file and return them as a
byte[]<\code>. |
static List<String> |
Utils.readAllLines(Files files,
Path source,
Charset cs)
Read all lines from a file and return them in a
List . |
static String |
Utils.readToString(Files files,
Path source,
Charset cs)
Read all the bytes from a file and return them as a
String<\code> using the |
static void |
Utils.recursiveCopy(Files files,
Path source,
Path target,
CopyOption... options)
Recursively copies directories, files and symbolic links from source to target.
|
static void |
Utils.recursiveDelete(Files files,
Path path)
Recursively removes all directories, files and symbolic links in path.
|
static Path |
Utils.resolveWithEntryPath(Files files,
FileSystem fileSystem,
String... path)
Resolve a relative
path with the entry path of the fileSystem and return a new
Path that represents this location. |
static Path |
Utils.resolveWithRoot(Files files,
Path root,
String... path)
|
void |
Sandbox.setUploadFiles(Path... files)
Sets the list of files that will be uploaded to
files . |
void |
Sandbox.upload(CopyOption... options)
Upload files to sandbox.
|
FileVisitResult |
FileVisitor.visitFile(Path file,
FileAttributes attributes,
Files files)
Invoked for a file in a directory.
|
FileVisitResult |
FileVisitor.visitFileFailed(Path file,
XenonException exception,
Files files)
Invoked for a file that could not be visited.
|
static void |
Utils.walkFileTree(Files files,
Path start,
boolean followLinks,
int maxDepth,
FileVisitor visitor)
Walks a file tree.
|
static void |
Utils.walkFileTree(Files files,
Path start,
FileVisitor visitor)
Walks over a file tree.
|
static void |
Utils.write(Files files,
Path target,
byte[] bytes,
boolean truncate)
Writes bytes to a file.
|
static void |
Utils.write(Files files,
Path target,
Iterable<? extends CharSequence> lines,
Charset cs,
boolean truncate)
Write lines of text to a file.
|
Constructor and Description |
---|
Sandbox(Files files,
Path root,
String sandboxName)
Creates a sandbox.
|