Package com.scalagent.joram.mom.dest.ftp
Class FtpQueue
- java.lang.Object
-
- fr.dyade.aaa.agent.Agent
-
- org.objectweb.joram.mom.dest.Destination
-
- org.objectweb.joram.mom.dest.Queue
-
- com.scalagent.joram.mom.dest.ftp.FtpQueue
-
- All Implemented Interfaces:
AgentMBean,Encodable,Serializable,DestinationMBean,QueueMBean
public class FtpQueue extends Queue
TheFtpQueueclass implements the MOM queue behaviour, basically storing messages and delivering them upon clients requests.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.objectweb.joram.mom.dest.Queue
Queue.QueueFactory
-
-
Field Summary
Fields Modifier and Type Field Description private intclientContextprivate static booleanDEBUGprivate AgentIddmqprivate StringftpImplNameprivate static Loggerloggerprivate Stringpassprivate Stringpathprivate intrequestIdprivate static longserialVersionUIDdefine serialVersionUID for interoperabilityprivate TransferItftransferprivate Hashtable<String,FtpMessage>transferTableprivate Stringuser-
Fields inherited from class org.objectweb.joram.mom.dest.Queue
ARRIVAL_STATE_PREFIX, arrivalState, delayed, DELIVERY_TABLE_PREFIX, DELIVERY_TIMEOUT, deliveryTable, LENIENT_REDELIVERY_DELAY, LENIENT_UNDELIVERABLE, messages, nbExpirations, nbMaxMsg, nbMsgsDeniedSinceCreation, receiving, requests
-
Fields inherited from class org.objectweb.joram.mom.dest.Destination
clients, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strictCounters, task, temporary, WRITE
-
Fields inherited from class fr.dyade.aaa.agent.Agent
agentProfiling, emptyString, fixed, logmon
-
Fields inherited from interface fr.dyade.aaa.common.encoding.Encodable
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
-
-
Constructor Summary
Constructors Constructor Description FtpQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoProcessFtp(ClientMessages not, Message msg)private voidftpNot(FtpNot not)intgetEncodableClassId()Enables the sub classes not to implement this method.voidinitialize(boolean firstTime)Initializes the destination.protected booleanisFtpMsg(Message message)ClientMessagespreProcess(AgentId from, ClientMessages not)This method is needed to add processing before the standard handling.voidreact(AgentId from, Notification not)Distributes the received notifications to the appropriate reactions.voidsetProperties(Properties prop, boolean firstTime)Configures aFtpQueueinstance.StringtoString()Returns a string representation of this destination.-
Methods inherited from class org.objectweb.joram.mom.dest.Queue
abortReceiveRequest, acknowledgeRequest, addClientMessages, addMessage, agentSave, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, clear, decode, deliverMessages, denyRequest, doAdminSyncNotification, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, encode, exportMessages, finalize, getClientMessages, getConsumerLoad, getDefaultDMQId, getDefaultRedeliveryDelay, getDefaultThreshold, getDelayedMessage, getDelayedMessageCount, getDelayedMessages, getDeliveredMessageCount, getDeliveryDelay, getEncodedSize, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsDeliverSinceCreation, getNbMsgsDeniedSinceCreation, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getProducerLoad, getQueueMessage, getRedeliveryDelay, getStats, getThreshold, getType, getWaitingRequestCount, handleAdminRequestNot, handleExpiredNot, isPause, isSyncExceptionOnFullDest, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, receiveRequest, setDefaultRedeliveryDelay, setDeliveryDelay, setMsgTxName, setNbMaxMsg, setPause, setRedeliveryDelay, setSyncExceptionOnFullDest, setThreshold, storeMessage, wakeUpNot
-
Methods inherited from class org.objectweb.joram.mom.dest.Destination
agentFinalize, agentInitialize, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getJMXStatistics, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, postProcess, processAdminCommand, processInterceptors, processPause, processSetRight, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setRight, unknownAgent
-
Methods inherited from class fr.dyade.aaa.agent.Agent
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, hasName, incWorkInProgress, isAgentProfiling, isDeployed, isFixed, isUpdated, load, needToBeCommited, resetCommitTime, resetReactTime, resetTimer, save, sendTo, sendTo, sendTo, setAgentProfiling, setName, setNoSave, setSave
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.dyade.aaa.agent.AgentMBean
getAgentId, getCommitTime, getReactNb, getReactTime, isAgentProfiling, isFixed, resetCommitTime, resetReactTime, resetTimer, setAgentProfiling
-
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
user
private String user
-
pass
private String pass
-
path
private String path
-
transfer
private transient TransferItf transfer
-
dmq
private AgentId dmq
-
clientContext
private int clientContext
-
requestId
private int requestId
-
ftpImplName
private String ftpImplName
-
transferTable
private Hashtable<String,FtpMessage> transferTable
-
-
Method Detail
-
setProperties
public void setProperties(Properties prop, boolean firstTime) throws Exception
Configures aFtpQueueinstance.- Overrides:
setPropertiesin classQueue- Parameters:
prop- The initial set of properties.- Throws:
Exception
-
initialize
public void initialize(boolean firstTime) throws ExceptionInitializes the destination.- Overrides:
initializein classQueue- Parameters:
firstTime- true when first called by the factory- Throws:
Exception
-
react
public void react(AgentId from, Notification not) throws Exception
Description copied from class:QueueDistributes the received notifications to the appropriate reactions.
-
toString
public String toString()
Description copied from class:QueueReturns a string representation of this destination.- Specified by:
toStringin interfaceAgentMBean- Specified by:
toStringin interfaceDestinationMBean- Overrides:
toStringin classQueue- Returns:
- a string representation of this destination.
-
ftpNot
private void ftpNot(FtpNot not)
-
preProcess
public ClientMessages preProcess(AgentId from, ClientMessages not)
Description copied from class:DestinationThis method is needed to add processing before the standard handling. It is used in subclass ofQueueandTopic. The incoming messages can be modified or deleted during the processing.- Overrides:
preProcessin classDestination- Parameters:
from- The sender of the messagenot- The incoming messages.- Returns:
- The incoming messages after processing.
-
isFtpMsg
protected boolean isFtpMsg(Message message)
-
doProcessFtp
private void doProcessFtp(ClientMessages not, Message msg)
-
getEncodableClassId
public int getEncodableClassId()
Description copied from class:AgentEnables the sub classes not to implement this method.- Specified by:
getEncodableClassIdin interfaceEncodable- Overrides:
getEncodableClassIdin classQueue- Returns:
- -1
-
-