org.ow2.petals.bc.sftp.service
Class SFTPService

java.lang.Object
  extended by org.ow2.petals.bc.sftp.service.SFTPService

public class SFTPService
extends java.lang.Object

The SFTP JBI listener. Writes a file to SFTP server on incoming JBI message.

Author:
Charles Casadei - eBM WebSourcing

Constructor Summary
SFTPService(java.util.logging.Logger logger)
          Default constructor.
 
Method Summary
 void processDel(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
           
 void processDIR(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient sshClient)
          Lists files of the remote working directory.
 void processGET(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
          Gets the specified file from the SFTP server.
 void processGetAsAttachment(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
          Gets the specified file from the SFTP server.
 void processMGET(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
          Gets the specified files from the SFTP server.
 void processMPUT(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
           
 void processPUT(org.ow2.petals.component.framework.api.message.Exchange exchange, org.w3c.dom.Document inDocument, WrappedSftpClient client)
          Puts the content on the incoming XML message into the specified file, on the SFTP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFTPService

public SFTPService(java.util.logging.Logger logger)
Default constructor.

Parameters:
logger - logger used to log informations relative to this class.
Method Detail

processDIR

public void processDIR(org.ow2.petals.component.framework.api.message.Exchange exchange,
                       org.w3c.dom.Document inDocument,
                       WrappedSftpClient sshClient)
                throws javax.jbi.messaging.MessagingException
Lists files of the remote working directory.
Supported patterns are :
  • InOut
  • inOptionalOut
    No attachments are expected
    No fault / error is set on the message exchange by this method. This method wraps the errors into a MessagingException which must be handled at higher level.

    Parameters:
    exchange - the incoming message exchange
    connectionInfo - information on the SFTP server
    Throws:
    javax.jbi.messaging.MessagingException - if any problem is spotted during execution

  • processPUT

    public void processPUT(org.ow2.petals.component.framework.api.message.Exchange exchange,
                           org.w3c.dom.Document inDocument,
                           WrappedSftpClient client)
                    throws javax.jbi.messaging.MessagingException
    Puts the content on the incoming XML message into the specified file, on the SFTP server.
    Supported patterns are :
  • InOnly
  • inOptionalOut
  • RobustInOnly
    No attachments are expected
    No fault / error is set on the message exchange by this method. This method wraps the errors into a MessagingException which must be handled at higher level.

    Parameters:
    exchange - the incoming message exchange
    connectionInfo - information on the SFTP server
    Throws:
    javax.jbi.messaging.MessagingException - if any problem is spotted during execution

  • processMPUT

    public void processMPUT(org.ow2.petals.component.framework.api.message.Exchange exchange,
                            org.w3c.dom.Document inDocument,
                            WrappedSftpClient client)
                     throws javax.jbi.messaging.MessagingException
    Throws:
    javax.jbi.messaging.MessagingException

    processGET

    public void processGET(org.ow2.petals.component.framework.api.message.Exchange exchange,
                           org.w3c.dom.Document inDocument,
                           WrappedSftpClient client)
                    throws javax.jbi.messaging.MessagingException,
                           ConfigurationException
    Gets the specified file from the SFTP server.
    Supported pattern are :
  • InOut
  • No attachments are expected
    No fault / error is set on the message exchange by this method. This method wraps the errors into a MessagingException which must be handled at higher level.

    Parameters:
    exchange - the incoming message exchange
    connectionInfo - information on the SFTP server
    Throws:
    javax.jbi.messaging.MessagingException - if any problem is spotted during execution
    ConfigurationException

  • processGetAsAttachment

    public void processGetAsAttachment(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                       org.w3c.dom.Document inDocument,
                                       WrappedSftpClient client)
                                throws javax.jbi.messaging.MessagingException,
                                       ConfigurationException
    Gets the specified file from the SFTP server.
    Supported pattern are :
  • InOut
  • The specified file is returned as out-messsage attachment.

    Parameters:
    exchange - the incoming message exchange
    connectionInfo - information on the SFTP server
    Throws:
    javax.jbi.messaging.MessagingException - if any problem is spotted during execution
    ConfigurationException

  • processMGET

    public void processMGET(org.ow2.petals.component.framework.api.message.Exchange exchange,
                            org.w3c.dom.Document inDocument,
                            WrappedSftpClient client)
                     throws javax.jbi.messaging.MessagingException,
                            ConfigurationException
    Gets the specified files from the SFTP server.
    Supported patterns are :
  • InOut
  • inOptionalOut
    No attachments are expected
    No fault / error is set on the message exchange by this method. This method wraps the errors into a MessagingException which must be handled at higher level.

    Parameters:
    exchange - the incoming message exchange
    connectionInfo - information on the SFTP server
    Throws:
    javax.jbi.messaging.MessagingException - if any problem is spotted during execution
    ConfigurationException

  • processDel

    public void processDel(org.ow2.petals.component.framework.api.message.Exchange exchange,
                           org.w3c.dom.Document inDocument,
                           WrappedSftpClient client)
                    throws javax.jbi.messaging.MessagingException,
                           ConfigurationException
    Throws:
    javax.jbi.messaging.MessagingException
    ConfigurationException


    Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.