de.fzj.unicore.wsrflite.messaging
Class MessagingImpl

java.lang.Object
  extended by de.fzj.unicore.wsrflite.messaging.MessagingImpl
All Implemented Interfaces:
IMessaging

public class MessagingImpl
extends Object
implements IMessaging

manages the internal messaging system

Author:
schuller

Method Summary
 void cleanup()
          remove all content
protected  de.fzj.unicore.persist.Persist<MessageBean> createStore()
           
static MessagingImpl get()
           
 IMessagingChannel getChannel(String name)
          gets or creates a messaging channel with the given name
 PullPoint getPullPoint(String destination)
          get a pull point for reading internal messages targeted at the given destination The messages will be removed from the store, so the application has to process them all, or call
 IMessagingChannel getQueue(String name)
          Deprecated. use getChannel(String)) instead
 int getStoredMessages()
           
 boolean hasMessages(String destination)
          checks if unread messages exist for the given destination
 void registerProvider(IMessagingProvider provider, String id)
          register a new messaging provider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createStore

protected de.fzj.unicore.persist.Persist<MessageBean> createStore()
                                                           throws de.fzj.unicore.persist.PersistenceException
Throws:
de.fzj.unicore.persist.PersistenceException

get

public static MessagingImpl get()
                         throws MessagingException
Throws:
MessagingException

getStoredMessages

public int getStoredMessages()
                      throws de.fzj.unicore.persist.PersistenceException
Throws:
de.fzj.unicore.persist.PersistenceException

registerProvider

public void registerProvider(IMessagingProvider provider,
                             String id)
Description copied from interface: IMessaging
register a new messaging provider

Specified by:
registerProvider in interface IMessaging
See Also:
IMessagingProvider

hasMessages

public boolean hasMessages(String destination)
Description copied from interface: IMessaging
checks if unread messages exist for the given destination

Specified by:
hasMessages in interface IMessaging
Returns:
true if unread messages exist

getPullPoint

public PullPoint getPullPoint(String destination)
                       throws MessagingException
get a pull point for reading internal messages targeted at the given destination The messages will be removed from the store, so the application has to process them all, or call

Specified by:
getPullPoint in interface IMessaging
Parameters:
destination - - the name of the messaging queue
Returns:
a PullPoint
Throws:
MessagingException

getQueue

public IMessagingChannel getQueue(String name)
                           throws MessagingException
Deprecated. use getChannel(String)) instead

Specified by:
getQueue in interface IMessaging
Throws:
MessagingException

getChannel

public IMessagingChannel getChannel(String name)
                             throws MessagingException
Description copied from interface: IMessaging
gets or creates a messaging channel with the given name

Specified by:
getChannel in interface IMessaging
Parameters:
name - - the name of the messaging queue
Returns:
a IMessagingChannel
Throws:
MessagingException

cleanup

public void cleanup()
             throws de.fzj.unicore.persist.PersistenceException
remove all content

Throws:
de.fzj.unicore.persist.PersistenceException


Copyright © 2010. All Rights Reserved.