1 /* 2 * Conditions Of Use 3 * 4 * This software was developed by employees of the National Institute of 5 * Standards and Technology (NIST), an agency of the Federal Government. 6 * Pursuant to title 15 Untied States Code Section 105, works of NIST 7 * employees are not subject to copyright protection in the United States 8 * and are considered to be in the public domain. As a result, a formal 9 * license is not needed to use the software. 10 * 11 * This software is provided by NIST as a service and is expressly 12 * provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED 13 * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF 14 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT 15 * AND DATA ACCURACY. NIST does not warrant or make any representations 16 * regarding the use of the software or the results thereof, including but 17 * not limited to the correctness, accuracy, reliability or usefulness of 18 * the software. 19 * 20 * Permission to use this software is contingent upon your acceptance 21 * of the terms of this agreement 22 * 23 * . 24 * 25 */ 26 /******************************************************************************* 27 * Product of NIST/ITL Advanced Networking Technologies Division (ANTD). * 28 *******************************************************************************/ 29 package gov.nist.javax.sip.stack; 30 import gov.nist.javax.sip.message.*; 31 32 /** 33 * An interface for generating new requests and responses. This is implemented 34 * by the application and called by the stack for processing requests 35 * and responses. When a Request comes in off the wire, the stack calls 36 * newSIPServerRequest which is then responsible for processing the request. 37 * When a response comes off the wire, the stack calls newSIPServerResponse 38 * to process the response. 39 * 40 * @version 1.2 $Revision: 1.5 $ $Date: 2009/07/17 18:58:15 $ 41 * 42 * @author M. Ranganathan <br/> 43 * 44 * 45 * 46 */ 47 public interface StackMessageFactory { 48 /** 49 * Make a new SIPServerResponse given a SIPRequest and a message 50 * channel. 51 * 52 * @param sipRequest is the incoming request. 53 * @param msgChan is the message channel on which this request was 54 * received. 55 */ 56 public ServerRequestInterface newSIPServerRequest( 57 SIPRequest sipRequest, 58 MessageChannel msgChan); 59 60 /** 61 * Generate a new server response for the stack. 62 * 63 * @param sipResponse is the incoming response. 64 * @param msgChan is the message channel on which the response was 65 * received. 66 */ 67 public ServerResponseInterface newSIPServerResponse( 68 SIPResponse sipResponse, 69 MessageChannel msgChan); 70 } 71