1 23 package com.scalagent.joram.mom.dest.ftp; 24 25 import java.util.Properties ; 26 27 import org.objectweb.joram.mom.dest.DestinationImpl; 28 import org.objectweb.joram.mom.dest.Queue; 29 import org.objectweb.util.monolog.api.BasicLevel; 30 31 import fr.dyade.aaa.agent.AgentId; 32 import fr.dyade.aaa.agent.Notification; 33 34 40 public class FtpQueue extends Queue { 41 42 public static final String FTP_QUEUE_TYPE = "queue.ftp"; 43 44 public static String getDestinationType() { 45 return FTP_QUEUE_TYPE; 46 } 47 48 51 public FtpQueue() {} 52 53 59 public DestinationImpl createsImpl(AgentId adminId, Properties prop) { 60 return new FtpQueueImpl(getId(), adminId, prop); 61 } 62 63 public void react(AgentId from, Notification not) 64 throws Exception { 65 if (logger.isLoggable(BasicLevel.DEBUG)) 66 logger.log(BasicLevel.DEBUG, 67 "FtpQueue.react(" + from + ',' + not + ')'); 68 if (not instanceof FtpNot) { 69 ((FtpQueueImpl) destImpl).ftpNot((FtpNot) not); 70 } else 71 super.react(from, not); 72 } 73 } 74 | Popular Tags |