|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.transfer.UnitTestInProcessTransmitterImpl
public class UnitTestInProcessTransmitterImpl
This class delegates transfer service to the transfer receiver without using any networking. It is used for unit testing the transfer service without requiring two instance of the repository (and a http server) to be running.
| Constructor Summary | |
|---|---|
UnitTestInProcessTransmitterImpl(TransferReceiver receiver,
ContentService contentService,
TransactionService transactionService)
|
|
| Method Summary | |
|---|---|
void |
abort(Transfer transfer)
Abort the transfer |
Transfer |
begin(TransferTarget target)
Begin a transfer, the transfer object returned will be used by subsequent calls to the transfer service. |
void |
commit(Transfer transfer)
|
TransferReceiver |
getReceiver()
|
TransferProgress |
getStatus(Transfer transfer)
Get the status of an in process transfer |
void |
getTransferReport(Transfer transfer,
java.io.OutputStream results)
Get the destination side transfer report from the destination and write it to the specified output stream. |
void |
prepare(Transfer transfer)
|
void |
sendContent(Transfer transfer,
java.util.Set data)
Send the content of the specified urls |
void |
sendManifest(Transfer transfer,
java.io.File manifest,
java.io.OutputStream result)
|
void |
setReceiver(TransferReceiver receiver)
|
void |
verifyTarget(TransferTarget target)
Verify that the target is available |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnitTestInProcessTransmitterImpl(TransferReceiver receiver,
ContentService contentService,
TransactionService transactionService)
| Method Detail |
|---|
public Transfer begin(TransferTarget target)
throws TransferException
TransferTransmitter
begin in interface TransferTransmittertarget - definition of where to transfer to.
TransferException
public void abort(Transfer transfer)
throws TransferException
TransferTransmitter
abort in interface TransferTransmittertransfer - the transfer object returned by an earlier call to begin
TransferException
public void commit(Transfer transfer)
throws TransferException
commit in interface TransferTransmittertransfer - the transfer object returned by an earlier call to begin
TransferException
public void prepare(Transfer transfer)
throws TransferException
prepare in interface TransferTransmittertransfer - the transfer object returned by an earlier call to begin
TransferException
public void sendContent(Transfer transfer,
java.util.Set data)
TransferTransmitter
sendContent in interface TransferTransmittertransfer - the transfer object returned by an earlier call to begindata - the content to send
public void sendManifest(Transfer transfer,
java.io.File manifest,
java.io.OutputStream result)
throws TransferException
sendManifest in interface TransferTransmittertransfer - the transfer object returned by an earlier call to beginresult - - where to write the results, probably a temporary file the output steam should be
open and will be closed before the method returns.
TransferException
public void verifyTarget(TransferTarget target)
throws TransferException
TransferTransmitter
verifyTarget in interface TransferTransmitterTransferException
public TransferProgress getStatus(Transfer transfer)
throws TransferException
TransferTransmitter
getStatus in interface TransferTransmitterTransferExceptionpublic void setReceiver(TransferReceiver receiver)
public TransferReceiver getReceiver()
public void getTransferReport(Transfer transfer,
java.io.OutputStream results)
TransferTransmitterThe result stream will be closed.
getTransferReport in interface TransferTransmittertransfer - the transfer object returned by an earlier call to beginresults - - where to write the contents of the transfer report.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||