private static boolean gotSftpDeleteNotification = false;
public void onNotification(ServerNotification notification)
{
SftpTransportNotification sftpNotification;
if (notification instanceof SftpTransportNotification)
{
sftpNotification = (SftpTransportNotification) notification;
}
else
{
logger.debug("SftpTransportNotificationTestListener RECEIVED UNKNOWN NOTIFICATION OF TYPE {}",
notification.getClass().getName());
return;
}
String action = notification.getActionName();
if (action.equals(SFTP_GET_ACTION_MSG))
{
gotSftpGetNotification = true;
}
else if (action.equals(SFTP_PUT_ACTION_MSG))
{
gotSftpPutNotification = true;
}
else if (action.equals(SFTP_RENAME_ACTION_MSG))
{
gotSftpRenameNotification = true;
}
else if (action.equals(SFTP_DELETE_ACTION_MSG))
{
gotSftpDeleteNotification = true;
}
String resourceId = notification.getResourceIdentifier();
String timestamp = new Date(notification.getTimestamp()).toString();
String endpoint = sftpNotification.getEndpoint().getEndpointURI().toString();
String info = sftpNotification.getInfo();
long size = sftpNotification.getSize();
String msgType = "???";
String correlationId = "???";
if (notification.getSource() instanceof MuleMessage)
{