001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.jms; 007 008import javax.jms.JMSException; 009import javax.jms.Message; 010 011import org.fcrepo.kernel.api.observer.Event; 012 013/** 014 * Produce a JMS Message from a JCR Event 015 * 016 * @author awoods 017 */ 018public interface JMSEventMessageFactory { 019 020 /** 021 * Produce a JMS message from a JCR event with the 022 * given session 023 * 024 * @param jcrEvent the jcr event 025 * @param jmsSession the jms session 026 * @return JMS message created from a JCR event 027 * @throws JMSException if JMS exception occurred 028 */ 029 Message getMessage(final Event jcrEvent, 030 final javax.jms.Session jmsSession) throws JMSException; 031}