info.sswap.impl.empire.io
Class ClosureBuilder.DereferenceTask

java.lang.Object
  extended by info.sswap.impl.empire.io.ClosureBuilder.DereferenceTask
All Implemented Interfaces:
java.util.concurrent.Callable<ClosureBuilder.DereferenceTask>
Enclosing class:
ClosureBuilder

private class ClosureBuilder.DereferenceTask
extends java.lang.Object
implements java.util.concurrent.Callable<ClosureBuilder.DereferenceTask>

A dereference task that is executed in the separate thread.

Author:
Blazej Bulka

Field Summary
private  boolean byteLimitExceeded
          True if byte limit was exceeded
private  java.util.concurrent.ExecutorService executorService
          The executor service that will execute this task
private  com.hp.hpl.jena.rdf.model.Model model
          The model retrieved (may be null, if no data could be retrieved)
private  java.lang.String url
          The URL to be dereferenced
 
Constructor Summary
ClosureBuilder.DereferenceTask(java.lang.String url, java.util.concurrent.ExecutorService executorService)
          Creates a dereferencing task to retrieve the given URL with the specified executor service.
 
Method Summary
 ClosureBuilder.DereferenceTask call()
          The method that will be called by the ExecutorService to actually execute the task in its thread.
 com.hp.hpl.jena.rdf.model.Model getModel()
          Gets the dereferenced model (if any).
 java.lang.String getURL()
          Gets the URL that is dereferenced
 boolean isByteLimitExceeded()
          Checks whether the byte limit was exceeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

private java.lang.String url
The URL to be dereferenced


executorService

private java.util.concurrent.ExecutorService executorService
The executor service that will execute this task


model

private com.hp.hpl.jena.rdf.model.Model model
The model retrieved (may be null, if no data could be retrieved)


byteLimitExceeded

private boolean byteLimitExceeded
True if byte limit was exceeded

Constructor Detail

ClosureBuilder.DereferenceTask

public ClosureBuilder.DereferenceTask(java.lang.String url,
                                      java.util.concurrent.ExecutorService executorService)
Creates a dereferencing task to retrieve the given URL with the specified executor service.

Parameters:
url - the URL
executorService - the executor service
Method Detail

call

public ClosureBuilder.DereferenceTask call()
The method that will be called by the ExecutorService to actually execute the task in its thread.

Specified by:
call in interface java.util.concurrent.Callable<ClosureBuilder.DereferenceTask>

getModel

public com.hp.hpl.jena.rdf.model.Model getModel()
Gets the dereferenced model (if any).

Returns:
the dereferenced model (may be null, if the task was unsuccessful in dereferencing the model)

getURL

public java.lang.String getURL()
Gets the URL that is dereferenced

Returns:
URL

isByteLimitExceeded

public boolean isByteLimitExceeded()
Checks whether the byte limit was exceeded

Returns:
true if the byte limit is exceeded; false otherwise


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.