|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataRetriever
This interface specifies an DataRetriever. DataRetriever are used to provided an extended input stream for the processor chain.
| Field Summary | |
|---|---|
static java.lang.Integer |
NOTIFICATION_PROGRESS
This type of notification will be send if the progress changes. |
static java.lang.Integer |
RESULT_RETRIEVAL_ABORTED
This value is returned if the retrieval was aborted. |
static java.lang.Integer |
RESULT_RETRIEVAL_FAILED
This value is returned if the retrieval failed. |
static java.lang.Integer |
RESULT_RETRIEVAL_FAILED_BUT_RETRYABLE
This value is returned if the retrieval failed but it's retryable. |
static java.lang.Integer |
RESULT_RETRIEVAL_NOT_STARTED_YET
This value is returned if the download was not started yet. |
static java.lang.Integer |
RESULT_RETRIEVAL_OK
This value is returned if the retrieval finished without errors. |
| Method Summary | |
|---|---|
void |
abort()
Aborts the current retrieving. |
void |
addObserver(java.util.Observer o)
Adds an observer to the retriever, usable to retrieve progress change events. |
void |
connect()
Advise the Retriever to connect to the data source. |
void |
deleteObserver(java.util.Observer o)
Deletes an registered observer. |
void |
disconnect()
Disconnect from the data source. |
long |
getBytesRetrieved()
Returns the count of bytes read from the data source. |
long |
getBytesSkipped()
Returns the skipped bytes. |
Context |
getContext()
Gets the context from this data retriever. |
DataConsumer |
getDataConsumer()
|
Metadata |
getMetadata()
Returns the metadata of the data source connection. |
float |
getProgress()
Returns the progress in processing the data in percent. |
int |
getResultCode()
Returns the internal state and result code. |
java.net.URL |
getUrl()
Returns the URL which is retrieved. |
boolean |
isDataAvailable()
Returns true if the data source contains any data to be read. |
void |
retrieve()
Retrieves all available data and send it through the processor chain. |
void |
setBytesToSkip(long pBytesToSkip)
Skip the given bytes (seek) when reading the data source. |
void |
setContext(Context pContext)
Sets the context for this data retriever. |
void |
setDataConsumer(DataConsumer pDataConsumer)
|
void |
setUrl(java.net.URL pUrl)
Sets the URL to be retrieved. |
| Field Detail |
|---|
static final java.lang.Integer NOTIFICATION_PROGRESS
static final java.lang.Integer RESULT_RETRIEVAL_NOT_STARTED_YET
static final java.lang.Integer RESULT_RETRIEVAL_OK
static final java.lang.Integer RESULT_RETRIEVAL_FAILED
static final java.lang.Integer RESULT_RETRIEVAL_FAILED_BUT_RETRYABLE
static final java.lang.Integer RESULT_RETRIEVAL_ABORTED
| Method Detail |
|---|
void setDataConsumer(DataConsumer pDataConsumer)
DataConsumer getDataConsumer()
void setContext(Context pContext)
pContext - Context getContext()
java.net.URL getUrl()
void setUrl(java.net.URL pUrl)
pUrl -
void connect()
throws java.io.IOException
java.io.IOException
boolean isDataAvailable()
throws java.io.IOException
java.io.IOException
void retrieve()
throws java.io.IOException
java.io.IOException
void disconnect()
throws java.io.IOException
java.io.IOExceptionvoid abort()
long getBytesRetrieved()
float getProgress()
int getResultCode()
Metadata getMetadata()
void setBytesToSkip(long pBytesToSkip)
pBytesToSkip - long getBytesSkipped()
void addObserver(java.util.Observer o)
NOTIFICATION_PROGRESS will be sent when the progress is updated.
o - void deleteObserver(java.util.Observer o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||