Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * $Id: SftpTransportNotification.java 21125 2011-01-26 21:21:10Z dzapata $
   * --------------------------------------------------------------------------------------
   * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
   *
   * The software in this package is published under the terms of the CPAL v1.0
   * license, a copy of which has been included with this distribution in the
   * LICENSE.txt file.
   */
 
 package org.mule.transport.sftp.notification;
 
 
 {

    
serial version
 
     private static final long serialVersionUID = 4662315555948069782L;

    
logger used by this class
 
     protected static final Log logger = LogFactory.getLog(EndpointMessageNotification.class);

    
sftp transport specific actions
 
     private static final int SFTP_ACTION_BASE =  * 2;
     public static final int SFTP_GET_ACTION =  + 1;
     public static final int SFTP_PUT_ACTION =  + 2;
     public static final int SFTP_RENAME_ACTION =  + 3;
     public static final int SFTP_DELETE_ACTION =  + 4;
 
     public static final String SFTP_GET_ACTION_MSG = "sftp.get";
     public static final String SFTP_PUT_ACTION_MSG = "sftp.put";
     public static final String SFTP_RENAME_ACTION_MSG = "sftp.rename";
     public static final String SFTP_DELETE_ACTION_MSG = "sftp.delete";

    
sftp transport specific information
 
     private ImmutableEndpoint endpoint;
     private String info;
     private long size;
 
     static
     {
     }
 
     public SftpTransportNotification(MuleMessage resource,
                                      ImmutableEndpoint endpoint,
                                      String resourceIdentifier,
                                      int action,
                                      String info,
                                      long size)
     {
 
         super(resourceactionresourceIdentifier);
 
         if (.isDebugEnabled()) .debug("*** SftpTransportNotification object created ***");
 
         this. = endpoint;
         this. = info;
         this. = size;
     }
 
     protected String getPayloadToString()
     {
         try
         {
             return ((MuleMessage).getPayloadAsString();
         }
         catch (Exception e)
         {
             return .toString();
         }
     }
 
     public String toString()
     {
         return  + "{action = " + getActionName() + ", endpoint = "
                + .getEndpointURI() + ", info = " +  + ", size = " + 
                + ", resourceIdentifier = " +  + ", timestamp = " + 
                + ", serverId = " +  + ", message = " +  + "}";
     }
 
     public ImmutableEndpoint getEndpoint()
    {
        return ;
    }
    public String getInfo()
    {
        return ;
    }
    public long getSize()
    {
        return ;
    }
New to GrepCode? Check out our FAQ X