org.fcrepo.server.messaging
Class MessagingImpl

java.lang.Object
  extended by org.fcrepo.server.messaging.MessagingImpl
All Implemented Interfaces:
Messaging

public class MessagingImpl
extends Object
implements Messaging

The default, JMS implementation of Messaging.

Since:
3.0
Version:
$Id$
Author:
Edwin Shin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.fcrepo.server.messaging.Messaging
Messaging.MessageType
 
Constructor Summary
MessagingImpl(String fedoraBaseUrl, Map<String,List<String>> mdMap, JMSManager jmsMgr)
           
MessagingImpl(String fedoraBaseUrl, Map<String,List<String>> mdMap, Properties jndiProps)
          Required JNDI Properties: INITIAL_CONTEXT_FACTORY PROVIDER_URL Optional JNDI Properties: CONNECTION_FACTORY_NAME
 
Method Summary
 void close()
          Shutdown and/or close any resources and/or connections.
 void send(FedoraMethod method)
          Send a message to each of the destinations configured for each Messaging#MessageType.
 void send(String destName, FedoraMessage message)
          Send the FedoraMessage to the specified destination.
 void send(String destName, FedoraMethod method, FedoraMessage message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagingImpl

public MessagingImpl(String fedoraBaseUrl,
                     Map<String,List<String>> mdMap,
                     Properties jndiProps)
              throws MessagingException
Required JNDI Properties: Optional JNDI Properties:

Parameters:
fedoraBaseUrl - e.g. http://localhost:8080/fedora
mdMap - a Map of Messaging#MessageType to Destinations.
jndiProps - the JNDI configuration properties.
Throws:
MessagingException

MessagingImpl

public MessagingImpl(String fedoraBaseUrl,
                     Map<String,List<String>> mdMap,
                     JMSManager jmsMgr)
Method Detail

send

public void send(String destName,
                 FedoraMessage message)
          throws MessagingException
Description copied from interface: Messaging
Send the FedoraMessage to the specified destination.

Specified by:
send in interface Messaging
Parameters:
destName - The destination of the message.
message - The message to send.
Throws:
MessagingException

send

public void send(String destName,
                 FedoraMethod method,
                 FedoraMessage message)
          throws MessagingException
Throws:
MessagingException

send

public void send(FedoraMethod method)
          throws MessagingException
Send a message to each of the destinations configured for each Messaging#MessageType. Currently, only FedoraMethods that represent org.fcrepo.server.Management methods are supported. Send a message representing the FedoraMethod. The message representation and destination(s) are determined by the implementing class.

Specified by:
send in interface Messaging
Parameters:
method - The method to send.
Throws:
MessagingException

close

public void close()
           throws MessagingException
Description copied from interface: Messaging
Shutdown and/or close any resources and/or connections.

Specified by:
close in interface Messaging
Throws:
MessagingException


Copyright © 2012 DuraSpace. All Rights Reserved.