Class MultiProtocolOutgoingAdapter
java.lang.Object
org.eclipse.ecf.provider.filetransfer.outgoing.MultiProtocolOutgoingAdapter
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,ISendFileTransferContainerAdapter,ISendFileTransfer
Multi protocol handler for outgoing file transfer. Multiplexes between Apache
httpclient 3.0.1-based file retriever and the URLConnection-based file
retriever.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd incoming file transfer listener.<T> TgetAdapter(Class<T> adapter) Get namespace for outgoing file transfer.booleanRemove incoming file transfer listenervoidsendOutgoingRequest(IFileID targetID, File outgoingFile, IFileTransferListener transferListener, Map options) Send request for outgoing file transfer.voidsendOutgoingRequest(IFileID targetID, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map options) Send request for outgoing file transfer.voidsetConnectContextForAuthentication(IConnectContext connectContext) Set connect context for authentication upon subsequentISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map).voidSet proxy for use upon subsequentISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map).
-
Constructor Details
-
MultiProtocolOutgoingAdapter
public MultiProtocolOutgoingAdapter()
-
-
Method Details
-
getOutgoingNamespace
Description copied from interface:ISendFileTransferContainerAdapterGet namespace for outgoing file transfer.- Specified by:
getOutgoingNamespacein interfaceISendFileTransferContainerAdapter- Returns:
- Namespace for outgoing IFileID instances. Will not return
null.
-
setConnectContextForAuthentication
Description copied from interface:ISendFileTransferContainerAdapterSet connect context for authentication upon subsequentISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map). This method should be called with a non-null connectContext in order to allow authentication to occur during call toISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map).- Specified by:
setConnectContextForAuthenticationin interfaceISendFileTransferContainerAdapter- Parameters:
connectContext- the connect context to use for authenticating during subsequent call toISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map). Ifnull, then no authentication will be attempted.
-
setProxy
Description copied from interface:ISendFileTransferContainerAdapterSet proxy for use upon subsequentISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map). This method should be called with a non-null proxy to allow the given proxy to be used in subsequent calls toISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map).- Specified by:
setProxyin interfaceISendFileTransferContainerAdapter- Parameters:
proxy- the proxy to use for subsequent calls toISendFileTransferContainerAdapter.sendOutgoingRequest(IFileID, IFileTransferInfo, IFileTransferListener, Map). Ifnull, then no proxy will be used.
-
sendOutgoingRequest
public void sendOutgoingRequest(IFileID targetID, File outgoingFile, IFileTransferListener transferListener, Map options) throws SendFileTransferException Description copied from interface:ISendFileTransferContainerAdapterSend request for outgoing file transfer. This method is used to initiate a file transfer to a targetReceiver (first parameter) of the localFileToSend (second parameter). File transfer events are asynchronously delivered to the file transferListener (third parameter)- Specified by:
sendOutgoingRequestin interfaceISendFileTransferContainerAdapter- Parameters:
targetID- the ID of the remote to receive the file transfer request. Must not benull.outgoingFile- theFilefor the local file to send. Must not benull.transferListener- aIFileTransferListenerfor responding to file transfer events. Must not benull. If the target receiver responds then an IOutgoingFileTransfer will be delivered to the listeneroptions- a Map of options associated with sendOutgoingRequest. The particular name/value pairs will be unique to the individual providers. May benull.- Throws:
SendFileTransferException- if the provider is not connected or is not in the correct state for initiating file transfer
-
addListener
Description copied from interface:ISendFileTransferContainerAdapterAdd incoming file transfer listener. If the underlying provider supports receiving file transfer requests- Specified by:
addListenerin interfaceISendFileTransferContainerAdapter- Parameters:
listener- to receive incoming file transfer request events. Must not benull.
-
removeListener
Description copied from interface:ISendFileTransferContainerAdapterRemove incoming file transfer listener- Specified by:
removeListenerin interfaceISendFileTransferContainerAdapter- Parameters:
listener- the listener to remove. Must not benull.- Returns:
- true if listener actually removed, false otherwise
-
sendOutgoingRequest
public void sendOutgoingRequest(IFileID targetID, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map options) throws SendFileTransferException Description copied from interface:ISendFileTransferContainerAdapterSend request for outgoing file transfer. This method is used to initiate a file transfer to a targetReceiver (first parameter) of the localFileToSend (second parameter). File transfer events are asynchronously delivered to the file transferListener (third parameter)- Specified by:
sendOutgoingRequestin interfaceISendFileTransferContainerAdapter- Parameters:
targetID- the ID of the remote to receive the file transfer request. Must not be should not benull.localFileToSend- theIFileTransferInfofor the local file to send. Must not be should not benull.transferListener- aIFileTransferListenerfor responding to file transfer events. Must not be should not benull.. If the target receiver responds then anIOutgoingFileTransferResponseEventwill be delivered to the listeneroptions- a Map of options associated with sendOutgoingRequest. The particular name/value pairs will be unique to the individual providers. May be should not benull..- Throws:
SendFileTransferException- if the provider is not connected or is not in the correct state for initiating file transfer
-
getAdapter
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-