001    /*
002     * Copyright (C) The Apache Software Foundation. All rights reserved.
003     *
004     * This software is published under the terms of the Apache Software License
005     * version 1.1, a copy of which has been included with this distribution in
006     * the LICENSE file.
007     * 
008     * $Id: MessageletResponse.java 155459 2005-02-26 13:24:44Z dirkv $
009     */
010    package org.apache.commons.messagelet;
011    
012    import javax.jms.Destination;
013    import javax.jms.JMSException;
014    import javax.jms.Message;
015    import javax.servlet.ServletResponse;
016    
017    import org.apache.commons.messenger.Messenger;
018    
019    
020    /** <p><code>MessageletResponse</code> represents a servlet response from
021      * a JMS Message.</p>
022      *
023      * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
024      * @version $Revision: 155459 $
025      */
026    public interface MessageletResponse extends ServletResponse {
027    
028        /** Sends a reply to the original message */
029        public void sendReply(Message reply) throws JMSException;
030    
031        
032        /** Returns the Messenger that should be used for sending replies to this incoming request */
033        public Messenger getReplyMessenger() throws JMSException;
034        
035        /** Returns the destination that reply to messages are sent */
036        public Destination getReplyToDestination() throws JMSException;
037    }
038