com.infoscape.proteus
Class SinkImpl

java.lang.Object
  |
  +--com.infoscape.proteus.MessageHandlerImpl
        |
        +--com.infoscape.proteus.SinkImpl
All Implemented Interfaces:
MessageHandler, MessageSink, Transactional
Direct Known Subclasses:
DBSink, FTPSink, JMSSink, MQSink, TibcoSink

public abstract class SinkImpl
extends MessageHandlerImpl
implements MessageSink

Base class for sinks. Descendants don't implement putMessage themselves, instead they implement a protected method called _putMessage. SinkImpl wraps reconnect logic around this method.


Constructor Summary
SinkImpl(Connection conn)
           
 
Method Summary
protected abstract  void _putMessage(java.lang.Object msg)
           
 void putMessage(java.lang.Object msg)
          This method takes an Object as parameter.
 
Methods inherited from class com.infoscape.proteus.MessageHandlerImpl
commit, disconnect, getConnection, log, log, reconnect, rollback, setSyncPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.infoscape.proteus.MessageHandler
disconnect, getConnection, reconnect
 
Methods inherited from interface com.infoscape.proteus.Transactional
commit, rollback, setSyncPoint
 

Constructor Detail

SinkImpl

public SinkImpl(Connection conn)
         throws java.lang.Exception
Parameters:
conn -
Throws:
java.lang.Exception
Method Detail

putMessage

public void putMessage(java.lang.Object msg)
                throws java.lang.Exception
Description copied from interface: MessageSink
This method takes an Object as parameter. In real life this is usually a string, but we have found that the flexibility gained by declaring this as an Object can be very useful.

Specified by:
putMessage in interface MessageSink
Parameters:
msg -
Throws:
java.lang.Exception

_putMessage

protected abstract void _putMessage(java.lang.Object msg)
                             throws java.lang.Exception
Parameters:
msg -
Throws:
java.lang.Exception