1package javax.sip.message; 2 3import java.text.ParseException; 4import java.util.List; 5import javax.sip.address.URI; 6import javax.sip.header.CSeqHeader; 7import javax.sip.header.CallIdHeader; 8import javax.sip.header.ContentTypeHeader; 9import javax.sip.header.FromHeader; 10import javax.sip.header.MaxForwardsHeader; 11import javax.sip.header.ServerHeader; 12import javax.sip.header.ToHeader; 13import javax.sip.header.UserAgentHeader; 14 15public interface MessageFactory { 16 Request createRequest(URI requestURI, String method, CallIdHeader callId, 17 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 18 MaxForwardsHeader maxForwards, ContentTypeHeader contentType, 19 Object content) throws ParseException; 20 21 Request createRequest(URI requestURI, String method, CallIdHeader callId, 22 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 23 MaxForwardsHeader maxForwards, ContentTypeHeader contentType, 24 byte[] content) throws ParseException; 25 26 Request createRequest(URI requestURI, String method, CallIdHeader callId, 27 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 28 MaxForwardsHeader maxForwards) throws ParseException; 29 30 Request createRequest(String request) throws ParseException; 31 32 Response createResponse(int statusCode, CallIdHeader callId, 33 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 34 MaxForwardsHeader maxForwards, ContentTypeHeader contentType, 35 Object content) throws ParseException; 36 37 Response createResponse(int statusCode, CallIdHeader callId, 38 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 39 MaxForwardsHeader maxForwards, ContentTypeHeader contentType, 40 byte[] content) throws ParseException; 41 42 Response createResponse(int statusCode, CallIdHeader callId, 43 CSeqHeader cSeq, FromHeader from, ToHeader to, List via, 44 MaxForwardsHeader maxForwards) throws ParseException; 45 46 Response createResponse(int statusCode, Request request, 47 ContentTypeHeader contentType, Object content) 48 throws ParseException; 49 50 Response createResponse(int statusCode, Request request, 51 ContentTypeHeader contentType, byte[] content) 52 throws ParseException; 53 54 Response createResponse(int statusCode, Request request) 55 throws ParseException; 56 57 Response createResponse(String response) throws ParseException; 58 59 void setDefaultContentEncodingCharset(String defaultContentEncodingCharset) 60 throws NullPointerException, IllegalArgumentException; 61 void setDefaultServerHeader(ServerHeader defaultServerHeader); 62 void setDefaultUserAgentHeader(UserAgentHeader defaultUserAgentHeader); 63} 64 65