01: /*
02: * Portions Copyright 2000-2007 Sun Microsystems, Inc. All Rights
03: * Reserved. Use is subject to license terms.
04: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License version
08: * 2 only, as published by the Free Software Foundation.
09: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * General Public License version 2 for more details (a copy is
14: * included at /legal/license.txt).
15: *
16: * You should have received a copy of the GNU General Public License
17: * version 2 along with this work; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
22: * Clara, CA 95054 or visit www.sun.com if you need additional
23: * information or have any questions.
24: */
25: /*
26: */
27: package gov.nist.siplite.stack;
28:
29: import gov.nist.siplite.message.*;
30:
31: /**
32: * An interface for a genereic message processor for SIP Request messages.
33: * This is implemented by the application. The stack calls the message
34: * factory with a pointer to the parsed structure to create one of these
35: * and then calls processRequest on the newly created SIPServerRequest
36: * It is the applications responsibility to take care of what needs to be
37: * done to actually process the request.
38: *
39: * @version JAIN-SIP-1.1
40: *
41: *
42: * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a>
43: *
44: */
45: public interface SIPServerRequestInterface {
46: /**
47: * Gets the channel to where to send the response
48: * (the outgoing message channel).
49: * @return the response message channel
50: */
51: public MessageChannel getResponseChannel();
52:
53: /**
54: * Processes the message. This incorporates a feature request
55: * by Salvador Rey Calatayud <salreyca@TELECO.UPV.ES>
56: * @param sipRequest is the incoming SIP Request.
57: * @param incomingChannel is the incoming message channel (parameter
58: * added in response to a request by Salvador Rey Calatayud.)
59: * @throws SIPServerException Exception that gets thrown by
60: * this processor when an exception is encountered in the
61: * message processing.
62: */
63: public void processRequest(Request sipRequest,
64: MessageChannel incomingChannel) throws SIPServerException;
65:
66: /**
67: * Gets processing information.
68: * The stack queries processing information to add to the message log.
69: * by calling this interface. Return null if no processing information
70: * of interes thas been generated.
71: * @return the processing information
72: */
73: public String getProcessingInfo();
74: }
|