• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package javax.sip.header;
2 
3 import java.text.ParseException;
4 import java.util.Calendar;
5 import java.util.List;
6 import java.util.Locale;
7 import javax.sip.InvalidArgumentException;
8 import javax.sip.address.Address;
9 import javax.sip.address.URI;
10 
11 public interface HeaderFactory {
setPrettyEncoding(boolean flag)12     void setPrettyEncoding(boolean flag);
13 
createAcceptEncodingHeader(String encoding)14     AcceptEncodingHeader createAcceptEncodingHeader(String encoding)
15             throws ParseException;
16 
createAcceptHeader(String contentType, String contentSubType)17     AcceptHeader createAcceptHeader(String contentType, String contentSubType)
18             throws ParseException;
19 
createAcceptLanguageHeader(Locale language)20     AcceptLanguageHeader createAcceptLanguageHeader(Locale language);
21 
createAlertInfoHeader(URI alertInfo)22     AlertInfoHeader createAlertInfoHeader(URI alertInfo);
23 
createAllowEventsHeader(String eventType)24     AllowEventsHeader createAllowEventsHeader(String eventType)
25             throws ParseException;
26 
createAllowHeader(String method)27     AllowHeader createAllowHeader(String method) throws ParseException;
28 
createAuthenticationInfoHeader(String response)29     AuthenticationInfoHeader createAuthenticationInfoHeader(String response)
30             throws ParseException;
31 
createAuthorizationHeader(String scheme)32     AuthorizationHeader createAuthorizationHeader(String scheme)
33             throws ParseException;
34 
createCallIdHeader(String callId)35     CallIdHeader createCallIdHeader(String callId) throws ParseException;
36 
createCallInfoHeader(URI callInfo)37     CallInfoHeader createCallInfoHeader(URI callInfo);
38 
createContactHeader()39     ContactHeader createContactHeader();
40 
createContactHeader(Address address)41     ContactHeader createContactHeader(Address address);
42 
createContentDispositionHeader( String contentDispositionType)43     ContentDispositionHeader createContentDispositionHeader(
44             String contentDispositionType) throws ParseException;
45 
createContentEncodingHeader(String encoding)46     ContentEncodingHeader createContentEncodingHeader(String encoding)
47             throws ParseException;
48 
createContentLanguageHeader(Locale contentLanguage)49     ContentLanguageHeader createContentLanguageHeader(Locale contentLanguage);
50 
createContentLengthHeader(int contentLength)51     ContentLengthHeader createContentLengthHeader(int contentLength)
52             throws InvalidArgumentException;
53 
createContentTypeHeader(String contentType, String contentSubType)54     ContentTypeHeader createContentTypeHeader(String contentType,
55             String contentSubType) throws ParseException;
56 
57     /**
58      * @deprecated
59      * @see #createCSeqHeader(long, String)
60      */
createCSeqHeader(int sequenceNumber, String method)61     CSeqHeader createCSeqHeader(int sequenceNumber, String method)
62             throws ParseException, InvalidArgumentException;
63 
createCSeqHeader(long sequenceNumber, String method)64     CSeqHeader createCSeqHeader(long sequenceNumber, String method)
65             throws ParseException, InvalidArgumentException;
66 
createDateHeader(Calendar date)67     DateHeader createDateHeader(Calendar date);
68 
createErrorInfoHeader(URI errorInfo)69     ErrorInfoHeader createErrorInfoHeader(URI errorInfo);
70 
createEventHeader(String eventType)71     EventHeader createEventHeader(String eventType) throws ParseException;
72 
createExpiresHeader(int expires)73     ExpiresHeader createExpiresHeader(int expires)
74             throws InvalidArgumentException;
75 
createExtensionHeader(String name, String value)76     ExtensionHeader createExtensionHeader(String name, String value)
77             throws ParseException;
78 
createFromHeader(Address address, String tag)79     FromHeader createFromHeader(Address address, String tag)
80             throws ParseException;
81 
createHeader(String name, String value)82     Header createHeader(String name, String value) throws ParseException;
createHeader(String headerText)83     Header createHeader(String headerText) throws ParseException;
84 
createHeaders(String headers)85     List createHeaders(String headers) throws ParseException;
86 
createInReplyToHeader(String callId)87     InReplyToHeader createInReplyToHeader(String callId) throws ParseException;
88 
createMaxForwardsHeader(int maxForwards)89     MaxForwardsHeader createMaxForwardsHeader(int maxForwards)
90             throws InvalidArgumentException;
91 
createMimeVersionHeader(int majorVersion, int minorVersion)92     MimeVersionHeader createMimeVersionHeader(int majorVersion,
93             int minorVersion) throws InvalidArgumentException;
94 
createMinExpiresHeader(int minExpires)95     MinExpiresHeader createMinExpiresHeader(int minExpires)
96             throws InvalidArgumentException;
97 
createOrganizationHeader(String organization)98     OrganizationHeader createOrganizationHeader(String organization)
99             throws ParseException;
100 
createPriorityHeader(String priority)101     PriorityHeader createPriorityHeader(String priority) throws ParseException;
102 
createProxyAuthenticateHeader(String scheme)103     ProxyAuthenticateHeader createProxyAuthenticateHeader(String scheme)
104             throws ParseException;
105 
createProxyAuthorizationHeader(String scheme)106     ProxyAuthorizationHeader createProxyAuthorizationHeader(String scheme)
107             throws ParseException;
108 
createProxyRequireHeader(String optionTag)109     ProxyRequireHeader createProxyRequireHeader(String optionTag)
110             throws ParseException;
111 
createRAckHeader(long rSeqNumber, long cSeqNumber, String method)112     RAckHeader createRAckHeader(long rSeqNumber, long cSeqNumber, String method)
113             throws InvalidArgumentException, ParseException;
114 
115     /**
116      * @deprecated
117      * @see #createRAckHeader(long, long, String)
118      */
createRAckHeader(int rSeqNumber, int cSeqNumber, String method)119     RAckHeader createRAckHeader(int rSeqNumber, int cSeqNumber, String method)
120             throws InvalidArgumentException, ParseException;
121 
createReasonHeader(String protocol, int cause, String text)122     ReasonHeader createReasonHeader(String protocol, int cause, String text)
123             throws InvalidArgumentException, ParseException;
124 
createRecordRouteHeader(Address address)125     RecordRouteHeader createRecordRouteHeader(Address address);
126 
createReferToHeader(Address address)127     ReferToHeader createReferToHeader(Address address);
128 
createReplyToHeader(Address address)129     ReplyToHeader createReplyToHeader(Address address);
130 
createRequireHeader(String optionTag)131     RequireHeader createRequireHeader(String optionTag) throws ParseException;
132 
createRetryAfterHeader(int retryAfter)133     RetryAfterHeader createRetryAfterHeader(int retryAfter)
134             throws InvalidArgumentException;
135 
createRouteHeader(Address address)136     RouteHeader createRouteHeader(Address address);
137 
createRSeqHeader(long sequenceNumber)138     RSeqHeader createRSeqHeader(long sequenceNumber)
139             throws InvalidArgumentException;
140 
141     /**
142      * @deprecated
143      * @see #createRSeqHeader(long)
144      */
createRSeqHeader(int sequenceNumber)145     RSeqHeader createRSeqHeader(int sequenceNumber)
146             throws InvalidArgumentException;
147 
createServerHeader(List product)148     ServerHeader createServerHeader(List product) throws ParseException;
149 
createSIPETagHeader(String etag)150     SIPETagHeader createSIPETagHeader(String etag) throws ParseException;
151 
createSIPIfMatchHeader(String etag)152     SIPIfMatchHeader createSIPIfMatchHeader(String etag) throws ParseException;
153 
createSubjectHeader(String subject)154     SubjectHeader createSubjectHeader(String subject) throws ParseException;
155 
createSubscriptionStateHeader( String subscriptionState)156     SubscriptionStateHeader createSubscriptionStateHeader(
157             String subscriptionState) throws ParseException;
158 
createSupportedHeader(String optionTag)159     SupportedHeader createSupportedHeader(String optionTag)
160             throws ParseException;
161 
createTimeStampHeader(float timeStamp)162     TimeStampHeader createTimeStampHeader(float timeStamp)
163             throws InvalidArgumentException;
164 
createToHeader(Address address, String tag)165     ToHeader createToHeader(Address address, String tag) throws ParseException;
166 
createUnsupportedHeader(String optionTag)167     UnsupportedHeader createUnsupportedHeader(String optionTag)
168             throws ParseException;
169 
createUserAgentHeader(List product)170     UserAgentHeader createUserAgentHeader(List product) throws ParseException;
171 
createViaHeader(String host, int port, String transport, String branch)172     ViaHeader createViaHeader(String host, int port, String transport,
173             String branch) throws InvalidArgumentException, ParseException;
174 
createWarningHeader(String agent, int code, String comment)175     WarningHeader createWarningHeader(String agent, int code, String comment)
176             throws InvalidArgumentException, ParseException;
177 
createWWWAuthenticateHeader(String scheme)178     WWWAuthenticateHeader createWWWAuthenticateHeader(String scheme)
179             throws ParseException;
180 }
181