com.googlecode.jpattern.service.log.reader
Class MessageReader

java.lang.Object
  extended by com.googlecode.jpattern.service.log.reader.MessageReader
All Implemented Interfaces:
IMessageReader, Serializable

public class MessageReader
extends Object
implements IMessageReader

Author:
Francesco Cina' 10/ago/2009
See Also:
Serialized Form

Constructor Summary
MessageReader(IQueueMessages aQueue)
           
 
Method Summary
 IQueueMessage read()
          read the first message in the queue.
 IQueueMessage read(long lastReadedMessageId)
          Read the message with a specific id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageReader

public MessageReader(IQueueMessages aQueue)
Method Detail

read

public IQueueMessage read()
Description copied from interface: IMessageReader
read the first message in the queue. It's the same of read(-1);

Specified by:
read in interface IMessageReader
Returns:

read

public IQueueMessage read(long lastReadedMessageId)
Description copied from interface: IMessageReader
Read the message with a specific id

Specified by:
read in interface IMessageReader
Returns:


Copyright © 2011. All Rights Reserved.