Package net.messagevortex.transport.smtp
Class TestSmtpHandler
java.lang.Object
net.messagevortex.AbstractDaemon
net.messagevortex.transport.smtp.TestSmtpHandler
- All Implemented Interfaces:
Runnable,RunningDaemon,Transport,TransportSender
FIXME: This implementation uses a Greenmail SMTP server.
FIXME: It holds all in memory and gets thus slower and slower.
-
Constructor Summary
ConstructorsConstructorDescriptionTestSmtpHandler(String section) Coinstructor getting parameters from named config section. -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()Thread runner.voidsendMessage(String address, InputStream os) sends a message on the transport layer.voidShuts this class down.final voidInitializes and starts all threads required to run the daemon.Methods inherited from class net.messagevortex.AbstractDaemon
stopDaemonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.messagevortex.RunningDaemon
stopDaemon
-
Constructor Details
-
TestSmtpHandler
Coinstructor getting parameters from named config section.
- Parameters:
section- name of the config section- Throws:
IOException- if constructor fails to star SMTP server
-
-
Method Details
-
run
public void run()Thread runner.
Do not call this methode
FIXME: move to private class -
startDaemon
public final void startDaemon()Description copied from interface:RunningDaemonInitializes and starts all threads required to run the daemon.
- Specified by:
startDaemonin interfaceRunningDaemon- Overrides:
startDaemonin classAbstractDaemon
-
shutdownDaemon
public void shutdownDaemon()Description copied from interface:RunningDaemonShuts this class down.
This frees all resources and ends all threads for an application or layer shutdown. It is not possible to call start() after running shutdown().
- Specified by:
shutdownDaemonin interfaceRunningDaemon- Overrides:
shutdownDaemonin classAbstractDaemon
-
sendMessage
Description copied from interface:TransportSendersends a message on the transport layer.
This method is called by the blender layer to send a message.
- Specified by:
sendMessagein interfaceTransportSender- Parameters:
address- the string representation of the target address on the transport layeros- the outputstream providing the message- Throws:
IOException- if transport layer was unable to satisfy the request
-