Examples of SftpNotifier


Examples of org.mule.transport.sftp.notification.SftpNotifier

        try
        {
            String serviceName = (event.getFlowConstruct() == null)
                                                                   ? "UNKNOWN SERVICE"
                                                                   : event.getFlowConstruct().getName();
            SftpNotifier notifier = new SftpNotifier(connector, event.getMessage(), endpoint, serviceName);
            client = connector.createSftpClient(endpoint, notifier);
            String destDir = endpoint.getEndpointURI().getPath();

            if (logger.isDebugEnabled())
            {
View Full Code Here

Examples of org.mule.transport.sftp.notification.SftpNotifier

    protected void routeFile(String path) throws Exception
    {
        // A bit tricky initialization of the notifier in this case since we don't
        // have access to the message yet...
        SftpNotifier notifier = new SftpNotifier((SftpConnector) connector, createNullMuleMessage(),
            endpoint, flowConstruct.getName());

        InputStream inputStream = sftpRRUtil.retrieveFile(path, notifier);

        if (logger.isDebugEnabled())
        {
            logger.debug("Routing file: " + path);
        }

        MuleMessage message = createMuleMessage(inputStream);

        message.setOutboundProperty(SftpConnector.PROPERTY_FILENAME, path);
        message.setOutboundProperty(SftpConnector.PROPERTY_ORIGINAL_FILENAME, path);

        // Now we have access to the message, update the notifier with the message
        notifier.setMessage(message);
        routeMessage(message);

        if (logger.isDebugEnabled())
        {
            logger.debug("Routed file: " + path);
View Full Code Here

Examples of org.mule.transport.sftp.notification.SftpNotifier

        if (files.length == 0) return null;

        String path = files[0];
        // TODO. ML FIX. Can't we figure out the current service (for logging/audit
        // purpose)???
        SftpNotifier notifier = new SftpNotifier((SftpConnector) connector, createNullMuleMessage(),
            endpoint, endpoint.getName());

        InputStream inputStream = sftpRRUtil.retrieveFile(path, notifier);

        logger.debug("Routing file: " + path);

        MuleMessage message = createMuleMessage(inputStream);
        message.setOutboundProperty(SftpConnector.PROPERTY_ORIGINAL_FILENAME, path);

        // Now we can update the notifier with the message
        notifier.setMessage(message);
        return message;
    }
View Full Code Here

Examples of org.mule.transport.sftp.notification.SftpNotifier

            @Override
            public MuleEvent process() throws Exception
            {
                // A bit tricky initialization of the notifier in this case since we don't
                // have access to the message yet...
                SftpNotifier notifier = new SftpNotifier((SftpConnector) connector, createNullMuleMessage(),
                        endpoint, flowConstruct.getName());

                InputStream inputStream = sftpRRUtil.retrieveFile(path, notifier);

                if (logger.isDebugEnabled())
                {
                    logger.debug("Routing file: " + path);
                }

                MuleMessage message = createMuleMessage(inputStream);

                message.setProperty(SftpConnector.PROPERTY_FILENAME, path, PropertyScope.INBOUND);
                message.setProperty(SftpConnector.PROPERTY_ORIGINAL_FILENAME, path, PropertyScope.INBOUND);

                // Now we have access to the message, update the notifier with the message
                notifier.setMessage(message);
                routeMessage(message);

                if (logger.isDebugEnabled())
                {
                    logger.debug("Routed file: " + path);
View Full Code Here

Examples of org.mule.transport.sftp.notification.SftpNotifier

        if (files.length == 0) return null;

        String path = files[0];
        // TODO. ML FIX. Can't we figure out the current service (for logging/audit
        // purpose)???
        SftpNotifier notifier = new SftpNotifier((SftpConnector) connector, createNullMuleMessage(),
            endpoint, endpoint.getName());

        InputStream inputStream = sftpRRUtil.retrieveFile(path, notifier);

        logger.debug("Routing file: " + path);

        MuleMessage message = createMuleMessage(inputStream);
        message.setProperty(SftpConnector.PROPERTY_ORIGINAL_FILENAME, path, PropertyScope.INBOUND);

        // Now we can update the notifier with the message
        notifier.setMessage(message);
        return message;
    }
View Full Code Here

Examples of org.mule.transport.sftp.notification.SftpNotifier

        try
        {
            String serviceName = (event.getFlowConstruct() == null)
                                 ? "UNKNOWN SERVICE"
                                 : event.getFlowConstruct().getName();
            SftpNotifier notifier = new SftpNotifier(connector, event.getMessage(), endpoint, serviceName);
            client = connector.createSftpClient(endpoint, notifier);
            String destDir = endpoint.getEndpointURI().getPath();

            if (logger.isDebugEnabled())
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.