org.subethamail.smtp.helper
Class SimpleMessageListenerAdapter

java.lang.Object
  extended by org.subethamail.smtp.helper.SimpleMessageListenerAdapter
All Implemented Interfaces:
MessageHandlerFactory

public class SimpleMessageListenerAdapter
extends java.lang.Object
implements MessageHandlerFactory

MessageHandlerFactory implementation which adapts to a collection of MessageListeners. This allows us to preserve the old, convenient interface.

Author:
Jeff Schnitzer

Constructor Summary
SimpleMessageListenerAdapter(java.util.Collection<SimpleMessageListener> listeners)
          Initializes this factory with the listeners.
SimpleMessageListenerAdapter(java.util.Collection<SimpleMessageListener> listeners, int dataDeferredSize)
          Initializes this factory with the listeners.
SimpleMessageListenerAdapter(SimpleMessageListener listener)
          Initializes this factory with a single listener.
 
Method Summary
 MessageHandler create(MessageContext ctx)
          Called for the exchange of a single message during an SMTP conversation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMessageListenerAdapter

public SimpleMessageListenerAdapter(SimpleMessageListener listener)
Initializes this factory with a single listener. Default data deferred size is 5 megs.


SimpleMessageListenerAdapter

public SimpleMessageListenerAdapter(java.util.Collection<SimpleMessageListener> listeners)
Initializes this factory with the listeners. Default data deferred size is 5 megs.


SimpleMessageListenerAdapter

public SimpleMessageListenerAdapter(java.util.Collection<SimpleMessageListener> listeners,
                                    int dataDeferredSize)
Initializes this factory with the listeners.

Parameters:
dataDeferredSize - The server will buffer incoming messages to disk when they hit this limit in the DATA received.
Method Detail

create

public MessageHandler create(MessageContext ctx)
Description copied from interface: MessageHandlerFactory
Called for the exchange of a single message during an SMTP conversation.

Specified by:
create in interface MessageHandlerFactory
Parameters:
ctx - provides information about the client.


Copyright © 2009 SubEthaSMTP. All Rights Reserved. Build version: UNVERSIONED