org.jboss.messaging.core.message
Class SimpleMessageStore

java.lang.Object
  extended byorg.jboss.messaging.core.message.SimpleMessageStore
All Implemented Interfaces:
MessageStore, MessagingComponent

public class SimpleMessageStore
extends java.lang.Object
implements MessageStore

A MessageStore implementation.

Version:
$Revision: 2202 $ $Id: SimpleMessageStore.java 2202 2007-02-08 10:50:26Z timfox $
Author:
Ovidiu Feodorov, Tim Fox

Constructor Summary
SimpleMessageStore()
           
 
Method Summary
protected  org.jboss.messaging.core.message.MessageHolder addMessage(Message m)
           
 boolean forgetMessage(long messageID)
          Remove a message from the store
 java.lang.Object getInstance()
           
 java.util.List messageIds()
           
 MessageReference reference(long messageID)
          Return a new reference for a message already stored in the store and identified by
 MessageReference reference(Message m)
          Message m is stored in the store if it is not already known to the store, then a new MessageReference is returned for the Message
 int size()
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMessageStore

public SimpleMessageStore()
Method Detail

getInstance

public java.lang.Object getInstance()

reference

public MessageReference reference(Message m)
Description copied from interface: MessageStore
Message m is stored in the store if it is not already known to the store, then a new MessageReference is returned for the Message

Specified by:
reference in interface MessageStore
Parameters:
m - The Message for which to create the MessageReference
Returns:
The new MessageReference

reference

public MessageReference reference(long messageID)
Description copied from interface: MessageStore
Return a new reference for a message already stored in the store and identified by

Specified by:
reference in interface MessageStore
Parameters:
messageID -
Returns:
The reference or null if the message is not already stored in the store

forgetMessage

public boolean forgetMessage(long messageID)
Description copied from interface: MessageStore
Remove a message from the store

Specified by:
forgetMessage in interface MessageStore
Parameters:
messageID -
Returns:

size

public int size()

messageIds

public java.util.List messageIds()

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

toString

public java.lang.String toString()

addMessage

protected org.jboss.messaging.core.message.MessageHolder addMessage(Message m)


Copyright © 2006 JBoss Inc. All Rights Reserved.