org.kde.koala

Class TransferJob

public class TransferJob extends SimpleJob

The transfer job pumps data into and/or out of a Slave. Data is sent to the slave on request of the slave ( dataReq). If data coming from the slave can not be handled, the reading of data from the slave should be suspended. See TransferJobSignals for signals emitted by TransferJob

UNKNOWN: The transfer job pumps data into and/or out of a Slave.

Constructor Summary
protected TransferJob(Class dummy)
TransferJob(KURL url, int command, byte[] packedArgs, byte[] _staticData, boolean showProgressInfo)
Do not create a TransferJob.
Method Summary
StringclassName()
booleanisErrorPage()
Checks whether we got an error page.
booleanisSuspended()
Flow control.
QMetaObjectmetaObject()
booleanreportDataSent()
Returns whether the job reports the amount of data that has been sent (true), or whether the job reports the amount of data that has been received (false)
voidresume()
Flow control.
voidsendAsyncData(byte[] data)
Provide data to the job when async data is enabled.
voidsetAsyncDataEnabled(boolean enabled)
Enable the async data mode.
voidsetReportDataSent(boolean enabled)
When enabled, the job reports the amount of data that has been sent, instead of the amount of data that that has been received.
protected voidslotCanResume(long offset)
protected voidslotData(byte[] data)
protected voidslotDataReq()
protected voidslotErrorPage()
protected voidslotFinished()
protected voidslotMimetype(String mimetype)
protected voidslotNeedSubURLData()
protected voidslotPostRedirection()
protected voidslotRedirection(KURL url)
voidslotResult(Job job)
Called when m_subJob finishes.
protected voidslotSubURLData(Job arg1, byte[] arg2)
voidstart(Slave slave)
Called by the scheduler when a slave gets to work on this job.
voidsuspend()
Flow control.

Constructor Detail

TransferJob

protected TransferJob(Class dummy)

TransferJob

public TransferJob(KURL url, int command, byte[] packedArgs, byte[] _staticData, boolean showProgressInfo)
Do not create a TransferJob. Use KIO.get() or KIO.put() instead.

Parameters: url the url to get or put command the command to issue packedArgs the arguments _staticData additional data to transmit (e.g. in a HTTP Post) showProgressInfo true to show progress information to the user

UNKNOWN: Do not create a TransferJob.

Method Detail

className

public String className()

isErrorPage

public boolean isErrorPage()
Checks whether we got an error page. This currently only happens with HTTP urls. Call this from your slot connected to result().

Returns: true if we got an (HTML) error page from the server instead of what we asked for.

UNKNOWN: Checks whether we got an error page.

isSuspended

public boolean isSuspended()
Flow control.

Returns: true if the job is suspended

UNKNOWN: Flow control.

metaObject

public QMetaObject metaObject()

reportDataSent

public boolean reportDataSent()
Returns whether the job reports the amount of data that has been sent (true), or whether the job reports the amount of data that has been received (false)

UNKNOWN: Returns whether the job reports the amount of data that has been sent (true), or whether the job reports the amount of data that has been received (false)

resume

public void resume()
Flow control. Resume data processing from the slave.

UNKNOWN: Flow control.

sendAsyncData

public void sendAsyncData(byte[] data)
Provide data to the job when async data is enabled. Should be called exactly once after receiving a dataReq signal Sending an empty block indicates end of data.

UNKNOWN: Provide data to the job when async data is enabled.

setAsyncDataEnabled

public void setAsyncDataEnabled(boolean enabled)
Enable the async data mode. When async data is enabled, data should be provided to the job by calling sendAsyncData() instead of returning data in the dataReq() signal.

UNKNOWN: Enable the async data mode.

setReportDataSent

public void setReportDataSent(boolean enabled)
When enabled, the job reports the amount of data that has been sent, instead of the amount of data that that has been received.

See Also: TransferJob TransferJob

UNKNOWN: When enabled, the job reports the amount of data that has been sent, instead of the amount of data that that has been received.

slotCanResume

protected void slotCanResume(long offset)

slotData

protected void slotData(byte[] data)

slotDataReq

protected void slotDataReq()

slotErrorPage

protected void slotErrorPage()

slotFinished

protected void slotFinished()

slotMimetype

protected void slotMimetype(String mimetype)

slotNeedSubURLData

protected void slotNeedSubURLData()

slotPostRedirection

protected void slotPostRedirection()

slotRedirection

protected void slotRedirection(KURL url)

slotResult

public void slotResult(Job job)
Called when m_subJob finishes.

Parameters: job the job that finished

UNKNOWN: Called when m_subJob finishes.

slotSubURLData

protected void slotSubURLData(Job arg1, byte[] arg2)

start

public void start(Slave slave)
Called by the scheduler when a slave gets to work on this job.

Parameters: slave the slave that starts working on this job

UNKNOWN:

suspend

public void suspend()
Flow control. Suspend data processing from the slave.

UNKNOWN: Flow control.