00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 package com.scalagent.joram.mom.dest.ftp;
00024
00025 import java.util.Properties;
00026
00027 import org.objectweb.joram.mom.dest.DestinationImpl;
00028 import org.objectweb.joram.mom.dest.Queue;
00029 import org.objectweb.util.monolog.api.BasicLevel;
00030 import org.objectweb.util.monolog.api.Logger;
00031
00032 import fr.dyade.aaa.agent.AgentId;
00033 import fr.dyade.aaa.agent.Debug;
00034 import fr.dyade.aaa.agent.Notification;
00035
00042 public class FtpQueue extends Queue {
00044 private static final long serialVersionUID = 1L;
00045
00046 public static Logger logger = Debug.getLogger(FtpQueue.class.getName());
00047
00048 public static final String FTP_QUEUE_TYPE = "queue.ftp";
00049
00050 public static String getDestinationType() {
00051 return FTP_QUEUE_TYPE;
00052 }
00053
00057 public FtpQueue() {}
00058
00065 public DestinationImpl createsImpl(AgentId adminId, Properties prop) {
00066 return new FtpQueueImpl(adminId, prop);
00067 }
00068
00069 public void react(AgentId from, Notification not)
00070 throws Exception {
00071 if (logger.isLoggable(BasicLevel.DEBUG))
00072 logger.log(BasicLevel.DEBUG,
00073 "FtpQueue.react(" + from + ',' + not + ')');
00074 if (not instanceof FtpNot) {
00075 ((FtpQueueImpl) destImpl).ftpNot((FtpNot) not);
00076 } else
00077 super.react(from, not);
00078 }
00079 }