Domanda

I have a java component and would like to have it perform an sftp upload. I am looking at org.mule.transport.sftp for a way to directly instantiate a class for an "endpoint". I see I could use SftpClient but this does not look like the class that is used directly by the endpoint. Does anyone know what class would be best for me to perform such an sftp upload (Maybe SftpConnector.class?) I want to be able to set the properties myself, instead of relying on the limitations of the XML notation (my main goal is to have some logic to create the properties, such as identityFile, ...).

Thanks,

È stato utile?

Soluzione

The Mule-ish way to interact with transports is via the MuleClient.

Inject the MuleContext in your Java component, get the MuleClient from it and then use send or dispatch with a URI that matches the SFTP endpoint you want to interact with (like sftp://...).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top