de.huxhorn.lilith.sender
Class SimpleSendBytesService

java.lang.Object
  extended by de.huxhorn.lilith.sender.SimpleSendBytesService
All Implemented Interfaces:
SendBytesService

public class SimpleSendBytesService
extends java.lang.Object
implements SendBytesService


Field Summary
static int DEFAULT_POLL_INTERVALL
           
static int DEFAULT_QUEUE_SIZE
           
static int DEFAULT_RECONNECTION_DELAY
          The default reconnection delay (30000 milliseconds or 30 seconds).
 
Constructor Summary
SimpleSendBytesService(DataOutputStreamFactory dataOutputStreamFactory, WriteByteStrategy writeByteStrategy)
           
SimpleSendBytesService(DataOutputStreamFactory dataOutputStreamFactory, WriteByteStrategy writeByteStrategy, int queueSize, int reconnectionDelay, int pollIntervall)
           
 
Method Summary
 ConnectionState getConnectionState()
           
 boolean isDebug()
           
 void sendBytes(byte[] bytes)
          A byte-sender is expected to send the given byte array if possible.
 void setDebug(boolean debug)
           
 void shutDown()
           
 void startUp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RECONNECTION_DELAY

public static final int DEFAULT_RECONNECTION_DELAY
The default reconnection delay (30000 milliseconds or 30 seconds).

See Also:
Constant Field Values

DEFAULT_QUEUE_SIZE

public static final int DEFAULT_QUEUE_SIZE
See Also:
Constant Field Values

DEFAULT_POLL_INTERVALL

public static final int DEFAULT_POLL_INTERVALL
See Also:
Constant Field Values
Constructor Detail

SimpleSendBytesService

public SimpleSendBytesService(DataOutputStreamFactory dataOutputStreamFactory,
                              WriteByteStrategy writeByteStrategy)

SimpleSendBytesService

public SimpleSendBytesService(DataOutputStreamFactory dataOutputStreamFactory,
                              WriteByteStrategy writeByteStrategy,
                              int queueSize,
                              int reconnectionDelay,
                              int pollIntervall)
Method Detail

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)

getConnectionState

public ConnectionState getConnectionState()

sendBytes

public void sendBytes(byte[] bytes)
Description copied from interface: SendBytesService
A byte-sender is expected to send the given byte array if possible. There is no guarantee that the bytes are really sent out, e.g. in case of an error. There is no feedback of any kind concerning success or failure!

Specified by:
sendBytes in interface SendBytesService
Parameters:
bytes - the bytes to send.

startUp

public void startUp()
Specified by:
startUp in interface SendBytesService

shutDown

public void shutDown()
Specified by:
shutDown in interface SendBytesService


Copyright © 2009. All Rights Reserved.