Source Code Cross Referenced for HeaderFactory.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » sip » header » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.sip.header 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
003:         * Unpublished - rights reserved under the Copyright Laws of the United States.
004:         * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
005:         * Copyright © 2005 BEA Systems, Inc. All rights reserved.
006:         *
007:         * Use is subject to license terms.
008:         *
009:         * This distribution may include materials developed by third parties. 
010:         *
011:         * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
012:         *
013:         * Module Name   : JSIP Specification
014:         * File Name     : HeaderFactory.java
015:         * Author        : Phelim O'Doherty
016:         *
017:         *  HISTORY
018:         *  Version   Date      Author              Comments
019:         *  1.1     08/10/2002  Phelim O'Doherty 
020:         *  1.2     20/12/2005    Jereon Van Bemmel Added create methods for PUBLISH 
021:         *                                          headers
022:         *  1.2     20/12/2006    Phelim O'Doherty  Added new createCseqHeader with long 
023:         *                                          sequence number
024:         *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
025:         */package javax.sip.header;
026:
027:        import javax.sip.address.*;
028:        import java.text.ParseException;
029:        import javax.sip.InvalidArgumentException;
030:        import java.util.*;
031:
032:        /**
033:         * This interface provides factory methods that allow an application to create 
034:         * Header object from a particular implementation of JAIN SIP. This class is a 
035:         * singleton and can be retrieved from the 
036:         * {@link javax.sip.SipFactory#createHeaderFactory()}.
037:         *
038:         * @author BEA Systems, NIST
039:         * @version 1.2
040:         */
041:        public interface HeaderFactory {
042:
043:            /**
044:             * Creates a new AcceptEncodingHeader based on the newly supplied encoding 
045:             * value.
046:             *
047:             * @param encoding the new string containing the encoding value.
048:             * @throws ParseException which signals that an error has been reached
049:             * unexpectedly while parsing the encoding value.
050:             * @return the newly created AcceptEncodingHeader object.
051:             */
052:            public AcceptEncodingHeader createAcceptEncodingHeader(
053:                    String encoding) throws ParseException;
054:
055:            /**
056:             * Creates a new AcceptHeader based on the newly supplied contentType and 
057:             * contentSubType values.
058:             *
059:             * @param contentType the new string content type value.
060:             * @param contentSubType the new string content sub-type value.
061:             * @throws ParseException which signals that an error has been reached
062:             * unexpectedly while parsing the content type or content subtype value.
063:             * @return the newly created AcceptHeader object.
064:             */
065:            public AcceptHeader createAcceptHeader(String contentType,
066:                    String contentSubType) throws ParseException;
067:
068:            /**
069:             * Creates a new AcceptLanguageHeader based on the newly supplied 
070:             * language value.
071:             *
072:             * @param language the new Locale value of the language
073:             * @return the newly created AcceptLanguageHeader object.
074:             */
075:            public AcceptLanguageHeader createAcceptLanguageHeader(
076:                    Locale language);
077:
078:            /**
079:             * Creates a new AlertInfoHeader based on the newly supplied alertInfo value.
080:             *
081:             * @param alertInfo the new URI value of the alertInfo
082:             * @return the newly created AlertInfoHeader object.
083:             */
084:            public AlertInfoHeader createAlertInfoHeader(URI alertInfo);
085:
086:            /**
087:             * Creates a new AllowEventsHeader based on the newly supplied event type
088:             * value.
089:             *
090:             * @param eventType the new string containing the eventType value.
091:             * @throws ParseException which signals that an error has been reached
092:             * unexpectedly while parsing the eventType value.
093:             * @return the newly created AllowEventsHeader object.
094:             */
095:            public AllowEventsHeader createAllowEventsHeader(String eventType)
096:                    throws ParseException;
097:
098:            /**
099:             * Creates a new AllowHeader based on the newly supplied method value.
100:             *
101:             * @param method the new string containing the method value.
102:             * @throws ParseException which signals that an error has been reached
103:             * unexpectedly while parsing the method value.
104:             * @return the newly created AllowHeader object.
105:             */
106:            public AllowHeader createAllowHeader(String method)
107:                    throws ParseException;
108:
109:            /**
110:             * Creates a new AuthenticationInfoHeader based on the newly supplied 
111:             * response value.
112:             *
113:             * @param response the new string value of the response.
114:             * @throws ParseException which signals that an error has been reached
115:             * unexpectedly while parsing the response value.
116:             * @return the newly created AuthenticationInfoHeader object.
117:             */
118:            public AuthenticationInfoHeader createAuthenticationInfoHeader(
119:                    String response) throws ParseException;
120:
121:            /**
122:             * Creates a new AuthorizationHeader based on the newly supplied 
123:             * scheme value.
124:             *
125:             * @param scheme the new string value of the scheme.
126:             * @throws ParseException which signals that an error has been reached
127:             * unexpectedly while parsing the scheme value.
128:             * @return the newly created AuthorizationHeader object.
129:             */
130:            public AuthorizationHeader createAuthorizationHeader(String scheme)
131:                    throws ParseException;
132:
133:            /**
134:             * Creates a new CSeqHeader based on the newly supplied sequence number and 
135:             * method values.
136:             *
137:             * @param sequenceNumber the new integer value of the sequence number.
138:             * @param method the new string value of the method.
139:             * @throws InvalidArgumentException if supplied sequence number is less 
140:             * than zero.
141:             * @throws ParseException which signals that an error has been reached
142:             * unexpectedly while parsing the method value.
143:             * @return the newly created CSeqHeader object.
144:             *
145:             * @deprecated Since 1.2. Use {@link #createCSeqHeader(long, String)} method
146:             * with type long.
147:             */
148:            public CSeqHeader createCSeqHeader(int sequenceNumber, String method)
149:                    throws ParseException, InvalidArgumentException;
150:
151:            /**
152:             * Creates a new CSeqHeader based on the newly supplied sequence number and
153:             * method values.
154:             *
155:             * @param sequenceNumber the new long value of the sequence number.
156:             * @param method the new string value of the method.
157:             * @throws InvalidArgumentException if supplied sequence number is less
158:             * than zero.
159:             * @throws ParseException which signals that an error has been reached
160:             * unexpectedly while parsing the method value.
161:             * @return the newly created CSeqHeader object.
162:             *
163:             * @since v1.2
164:             */
165:            public CSeqHeader createCSeqHeader(long sequenceNumber,
166:                    String method) throws ParseException,
167:                    InvalidArgumentException;
168:
169:            /**
170:             * Creates a new CallIdHeader based on the newly supplied callId value. 
171:             * 
172:             * @param callId the new string value of the call-id.
173:             * @throws ParseException which signals that an error has been reached
174:             * unexpectedly while parsing the callId value.
175:             * @return the newly created CallIdHeader object.
176:             */
177:            public CallIdHeader createCallIdHeader(String callId)
178:                    throws ParseException;
179:
180:            /**
181:             * Creates a new CallInfoHeader based on the newly supplied callInfo value.
182:             *
183:             * @param callInfo the new URI value of the callInfo.
184:             * @return the newly created CallInfoHeader object.
185:             */
186:            public CallInfoHeader createCallInfoHeader(URI callInfo);
187:
188:            /**
189:             * Creates a new ContactHeader based on the newly supplied address value.
190:             *
191:             * @param address the new Address value of the address.
192:             * @return the newly created ContactHeader object.
193:             */
194:            public ContactHeader createContactHeader(Address address);
195:
196:            /**
197:             * Creates a new wildcard ContactHeader. This is used in Register requests
198:             * to indicate to the server that it should remove all locations the
199:             * at which the user is currently available. This implies that the 
200:             * following conditions are met:
201:             * <ul>
202:             * <li><code>ContactHeader.getAddress.getUserInfo() == *;</code>
203:             * <li><code>ContactHeader.getAddress.isWildCard() == true;</code>
204:             * <li><code>ContactHeader.getExpires() == 0;</code>
205:             * </ul>
206:             *
207:             * @return the newly created wildcard ContactHeader.
208:             */
209:            public ContactHeader createContactHeader();
210:
211:            /**
212:             * Creates a new ContentDispositionHeader based on the newly supplied 
213:             * contentDisposition value.
214:             *
215:             * @param contentDispositionType the new string value of the contentDisposition.
216:             * @throws ParseException which signals that an error has been reached
217:             * unexpectedly while parsing the contentDisposition value.
218:             * @return the newly created ContentDispositionHeader object.
219:             */
220:            public ContentDispositionHeader createContentDispositionHeader(
221:                    String contentDispositionType) throws ParseException;
222:
223:            /**
224:             * Creates a new ContentEncodingHeader based on the newly supplied encoding 
225:             * value.
226:             *
227:             * @param encoding the new string containing the encoding value.
228:             * @throws ParseException which signals that an error has been reached
229:             * unexpectedly while parsing the encoding value.
230:             * @return the newly created ContentEncodingHeader object.
231:             */
232:            public ContentEncodingHeader createContentEncodingHeader(
233:                    String encoding) throws ParseException;
234:
235:            /**
236:             * Creates a new ContentLanguageHeader based on the newly supplied 
237:             * contentLanguage value.
238:             *
239:             * @param contentLanguage the new Locale value of the contentLanguage.
240:             * @return the newly created ContentLanguageHeader object.
241:             */
242:            public ContentLanguageHeader createContentLanguageHeader(
243:                    Locale contentLanguage);
244:
245:            /**
246:             * Creates a new ContentLengthHeader based on the newly supplied contentLength value.
247:             *
248:             * @param contentLength the new integer value of the contentLength.
249:             * @throws InvalidArgumentException if supplied contentLength is less 
250:             * than zero.
251:             * @return the newly created ContentLengthHeader object.
252:             */
253:            public ContentLengthHeader createContentLengthHeader(
254:                    int contentLength) throws InvalidArgumentException;
255:
256:            /**
257:             * Creates a new ContentTypeHeader based on the newly supplied contentType and 
258:             * contentSubType values.
259:             *
260:             * @param contentType the new string content type value.
261:             * @param contentSubType the new string content sub-type value.
262:             * @throws ParseException which signals that an error has been reached
263:             * unexpectedly while parsing the content type or content subtype value.
264:             * @return the newly created ContentTypeHeader object.
265:             */
266:            public ContentTypeHeader createContentTypeHeader(
267:                    String contentType, String contentSubType)
268:                    throws ParseException;
269:
270:            /**
271:             * Creates a new DateHeader based on the newly supplied date value.
272:             *
273:             * @param date the new Calender value of the date.
274:             * @return the newly created DateHeader object. 
275:             */
276:            public DateHeader createDateHeader(Calendar date);
277:
278:            /**
279:             * Creates a new ErrorInfoHeader based on the newly supplied errorInfo value.
280:             *
281:             * @param errorInfo the new URI value of the errorInfo.
282:             * @return the newly created ErrorInfoHeader object.
283:             */
284:            public ErrorInfoHeader createErrorInfoHeader(URI errorInfo);
285:
286:            /**
287:             * Creates a new EventHeader based on the newly supplied eventType value.
288:             *
289:             * @param eventType the new string value of the eventType.
290:             * @throws ParseException which signals that an error has been reached
291:             * unexpectedly while parsing the eventType value.
292:             * @return the newly created EventHeader object.
293:             */
294:            public EventHeader createEventHeader(String eventType)
295:                    throws ParseException;
296:
297:            /**
298:             * Creates a new ExpiresHeader based on the newly supplied expires value.
299:             *
300:             * @param expires the new integer value of the expires.
301:             * @throws InvalidArgumentException if supplied expires is less 
302:             * than zero.
303:             * @return the newly created ExpiresHeader object.
304:             */
305:            public ExpiresHeader createExpiresHeader(int expires)
306:                    throws InvalidArgumentException;
307:
308:            /**
309:             * Creates a new Header based on the newly supplied name and value values. 
310:             * This method can be used to create ExtensionHeaders.
311:             *
312:             * @param name the new string name of the Header value.
313:             * @param value the new string value of the Header.
314:             * @throws ParseException which signals that an error has been reached
315:             * unexpectedly while parsing the name or value values.
316:             * @return the newly created Header object.
317:             * @see ExtensionHeader
318:             */
319:            public Header createHeader(String name, String value)
320:                    throws ParseException;
321:
322:            /**
323:             * Creates a new List of Headers based on a supplied comma seperated 
324:             * list of Header values for a single header name.
325:             * This method can be used only for SIP headers whose grammar is of the form
326:             * header = header-name HCOLON header-value *(COMMA header-value) that
327:             * allows for combining header fields of the same name into a 
328:             * comma-separated list.  Note that the Contact header field allows a 
329:             * comma-separated list  unless the header field 
330:             * value is "*"
331:             * @param headers the new string comma seperated list of Header values.
332:             * @throws ParseException which signals that an error has been reached
333:             * unexpectedly while parsing the headers value or a List of that Header
334:             * type is not allowed.
335:             * @return the newly created List of Header objects.
336:             */
337:            public List createHeaders(String headers) throws ParseException;
338:
339:            /**
340:             * Creates a new FromHeader based on the newly supplied address and 
341:             * tag values.
342:             *
343:             * @param address the new Address object of the address.
344:             * @param tag the new string value of the tag.
345:             * @throws ParseException which signals that an error has been reached
346:             * unexpectedly while parsing the tag value.
347:             * @return the newly created FromHeader object.  
348:             */
349:            public FromHeader createFromHeader(Address address, String tag)
350:                    throws ParseException;
351:
352:            /**
353:             * Creates a new InReplyToHeader based on the newly supplied callId 
354:             * value.
355:             *
356:             * @param callId the new string containing the callId value.
357:             * @throws ParseException which signals that an error has been reached
358:             * unexpectedly while parsing the callId value.
359:             * @return the newly created InReplyToHeader object.
360:             */
361:            public InReplyToHeader createInReplyToHeader(String callId)
362:                    throws ParseException;
363:
364:            /**
365:             * Creates a new MaxForwardsHeader based on the newly supplied maxForwards value.
366:             *
367:             * @param maxForwards the new integer value of the maxForwards.
368:             * @throws InvalidArgumentException if supplied maxForwards is less 
369:             * than zero or greater than 255.
370:             * @return the newly created MaxForwardsHeader object.
371:             */
372:            public MaxForwardsHeader createMaxForwardsHeader(int maxForwards)
373:                    throws InvalidArgumentException;
374:
375:            /**
376:             * Creates a new MimeVersionHeader based on the newly supplied mimeVersion 
377:             * values.
378:             *
379:             * @param majorVersion the new integer value of the majorVersion.
380:             * @param minorVersion the new integer value of the minorVersion.
381:             * @throws InvalidArgumentException if supplied majorVersion or minorVersion 
382:             * is less than zero.
383:             * @return the newly created MimeVersionHeader object.
384:             */
385:            public MimeVersionHeader createMimeVersionHeader(int majorVersion,
386:                    int minorVersion) throws InvalidArgumentException;
387:
388:            /**
389:             * Creates a new MinExpiresHeader based on the newly supplied minExpires value.
390:             *
391:             * @param minExpires the new integer value of the minExpires.
392:             * @throws InvalidArgumentException if supplied minExpires is less 
393:             * than zero.
394:             * @return the newly created MinExpiresHeader object.
395:             */
396:            public MinExpiresHeader createMinExpiresHeader(int minExpires)
397:                    throws InvalidArgumentException;
398:
399:            /**
400:             * Creates a new OrganizationHeader based on the newly supplied 
401:             * organization value.
402:             *
403:             * @param organization the new string value of the organization.
404:             * @throws ParseException which signals that an error has been reached
405:             * unexpectedly while parsing the organization value.
406:             * @return the newly created OrganizationHeader object.
407:             */
408:            public OrganizationHeader createOrganizationHeader(
409:                    String organization) throws ParseException;
410:
411:            /**
412:             * Creates a new PriorityHeader based on the newly supplied priority value.
413:             *
414:             * @param priority the new string value of the priority.
415:             * @throws ParseException which signals that an error has been reached
416:             * unexpectedly while parsing the priority value.
417:             * @return the newly created PriorityHeader object.
418:             */
419:            public PriorityHeader createPriorityHeader(String priority)
420:                    throws ParseException;
421:
422:            /**
423:             * Creates a new ProxyAuthenticateHeader based on the newly supplied 
424:             * scheme value.
425:             *
426:             * @param scheme the new string value of the scheme.
427:             * @throws ParseException which signals that an error has been reached
428:             * unexpectedly while parsing the scheme value.
429:             * @return the newly created ProxyAuthenticateHeader object.
430:             */
431:            public ProxyAuthenticateHeader createProxyAuthenticateHeader(
432:                    String scheme) throws ParseException;
433:
434:            /**
435:             * Creates a new ProxyAuthorizationHeader based on the newly supplied 
436:             * scheme value.
437:             *
438:             * @param scheme the new string value of the scheme.
439:             * @throws ParseException which signals that an error has been reached
440:             * unexpectedly while parsing the scheme value.
441:             * @return the newly created ProxyAuthorizationHeader object.
442:             */
443:            public ProxyAuthorizationHeader createProxyAuthorizationHeader(
444:                    String scheme) throws ParseException;
445:
446:            /**
447:             * Creates a new ProxyRequireHeader based on the newly supplied optionTag 
448:             * value.
449:             *
450:             * @param optionTag the new string OptionTag value.
451:             * @return the newly created ProxyRequireHeader object.
452:             * @throws ParseException which signals that an error has been reached
453:             * unexpectedly while parsing the optionTag value.
454:             */
455:            public ProxyRequireHeader createProxyRequireHeader(String optionTag)
456:                    throws ParseException;
457:
458:            /**
459:             * Creates a new RAckHeader based on the newly supplied rSeqNumber, 
460:             * cSeqNumber and method values.
461:             *
462:             * @param rSeqNumber the new integer value of the rSeqNumber.
463:             * @param cSeqNumber the new integer value of the cSeqNumber.
464:             * @param method the new string value of the method.
465:             * @throws InvalidArgumentException if supplied rSeqNumber or cSeqNumber is 
466:             * less than zero or greater than than 2**31-1.
467:             * @throws ParseException which signals that an error has been reached
468:             * unexpectedly while parsing the method value.
469:             * @return the newly created RAckHeader object.
470:             */
471:            public RAckHeader createRAckHeader(int rSeqNumber, int cSeqNumber,
472:                    String method) throws InvalidArgumentException,
473:                    ParseException;
474:
475:            /**
476:             * Creates a new RSeqHeader based on the newly supplied sequenceNumber value.
477:             *
478:             * @param sequenceNumber the new integer value of the sequenceNumber.
479:             * @throws InvalidArgumentException if supplied sequenceNumber is 
480:             * less than zero or greater than than 2**31-1.
481:             * @return the newly created RSeqHeader object.
482:             */
483:            public RSeqHeader createRSeqHeader(int sequenceNumber)
484:                    throws InvalidArgumentException;
485:
486:            /**
487:             * Creates a new ReasonHeader based on the newly supplied reason value.
488:             *
489:             * @param protocol the new string value of the protocol.
490:             * @param cause the new integer value of the cause.
491:             * @param text the new string value of the text.
492:             * @throws ParseException which signals that an error has been reached
493:             * unexpectedly while parsing the protocol or text value.
494:             * @throws InvalidArgumentException if supplied cause is 
495:             * less than zero.
496:             * @return the newly created ReasonHeader object.
497:             */
498:            public ReasonHeader createReasonHeader(String protocol, int cause,
499:                    String text) throws InvalidArgumentException,
500:                    ParseException;
501:
502:            /**
503:             * Creates a new RecordRouteHeader based on the newly supplied address value.
504:             *
505:             * @param address the new Address object of the address.
506:             * @return the newly created RecordRouteHeader object.  
507:             */
508:            public RecordRouteHeader createRecordRouteHeader(Address address);
509:
510:            /**
511:             * Creates a new ReplyToHeader based on the newly supplied address value.
512:             *
513:             * @param address the new Address object of the address.
514:             * @return the newly created ReplyToHeader object.  
515:             */
516:            public ReplyToHeader createReplyToHeader(Address address);
517:
518:            /**
519:             * Creates a new ReferToHeader based on the newly supplied address value.
520:             *
521:             * @param address the new Address object of the address.
522:             * @return the newly created ReferToHeader object.  
523:             */
524:            public ReferToHeader createReferToHeader(Address address);
525:
526:            /**
527:             * Creates a new RequireHeader based on the newly supplied optionTag 
528:             * value.
529:             *
530:             * @param optionTag the new string value containing the optionTag value.
531:             * @throws ParseException which signals that an error has been reached
532:             * unexpectedly while parsing the List of optionTag value.
533:             * @return the newly created RequireHeader object.
534:             */
535:            public RequireHeader createRequireHeader(String optionTag)
536:                    throws ParseException;
537:
538:            /**
539:             * Creates a new RetryAfterHeader based on the newly supplied retryAfter 
540:             * value.
541:             *
542:             * @param retryAfter the new integer value of the retryAfter.
543:             * @throws InvalidArgumentException if supplied retryAfter is less 
544:             * than zero.
545:             * @return the newly created RetryAfterHeader object.
546:             */
547:            public RetryAfterHeader createRetryAfterHeader(int retryAfter)
548:                    throws InvalidArgumentException;
549:
550:            /**
551:             * Creates a new RouteHeader based on the newly supplied address value.
552:             *
553:             * @param address the new Address object of the address.
554:             * @return the newly created RouteHeader object.  
555:             */
556:            public RouteHeader createRouteHeader(Address address);
557:
558:            /**
559:             * Creates a new ServerHeader based on the newly supplied List of product 
560:             * values.
561:             *
562:             * @param product the new List of values of the product.
563:             * @throws ParseException which signals that an error has been reached
564:             * unexpectedly while parsing the List of product values.
565:             * @return the newly created ServerHeader object.
566:             */
567:            public ServerHeader createServerHeader(List product)
568:                    throws ParseException;
569:
570:            /**
571:             * Creates a new SubjectHeader based on the newly supplied subject value.
572:             *
573:             * @param subject the new string value of the subject.
574:             * @throws ParseException which signals that an error has been reached
575:             * unexpectedly while parsing the subject value.
576:             * @return the newly created SubjectHeader object.
577:             */
578:            public SubjectHeader createSubjectHeader(String subject)
579:                    throws ParseException;
580:
581:            /**
582:             * Creates a new SubscriptionStateHeader based on the newly supplied 
583:             * subscriptionState value.
584:             *
585:             * @param subscriptionState the new string value of the subscriptionState.
586:             * @throws ParseException which signals that an error has been reached
587:             * unexpectedly while parsing the subscriptionState value.
588:             * @return the newly created SubscriptionStateHeader object.
589:             */
590:            public SubscriptionStateHeader createSubscriptionStateHeader(
591:                    String subscriptionState) throws ParseException;
592:
593:            /**
594:             * Creates a new SupportedHeader based on the newly supplied optionTag 
595:             * value.
596:             *
597:             * @param optionTag the new string containing the optionTag value.
598:             * @throws ParseException which signals that an error has been reached
599:             * unexpectedly while parsing the optionTag value.
600:             * @return the newly created SupportedHeader object.
601:             */
602:            public SupportedHeader createSupportedHeader(String optionTag)
603:                    throws ParseException;
604:
605:            /**
606:             * Creates a new TimeStampHeader based on the newly supplied timeStamp value.
607:             *
608:             * @param timeStamp the new float value of the timeStamp.
609:             * @throws InvalidArgumentException if supplied timeStamp is less 
610:             * than zero.
611:             * @return the newly created TimeStampHeader object.
612:             */
613:            public TimeStampHeader createTimeStampHeader(float timeStamp)
614:                    throws InvalidArgumentException;
615:
616:            /**
617:             * Creates a new ToHeader based on the newly supplied address and 
618:             * tag values.
619:             *
620:             * @param address the new Address object of the address.
621:             * @param tag the new string value of the tag, this value may be null.
622:             * @throws ParseException which signals that an error has been reached
623:             * unexpectedly while parsing the tag value.
624:             * @return the newly created ToHeader object.  
625:             */
626:            public ToHeader createToHeader(Address address, String tag)
627:                    throws ParseException;
628:
629:            /**
630:             * Creates a new UnsupportedHeader based on the newly supplied optionTag 
631:             * value.
632:             *
633:             * @param optionTag the new string containing the optionTag value.
634:             * @throws ParseException which signals that an error has been reached
635:             * unexpectedly while parsing the List of optionTag value.
636:             * @return the newly created UnsupportedHeader object.
637:             */
638:            public UnsupportedHeader createUnsupportedHeader(String optionTag)
639:                    throws ParseException;
640:
641:            /**
642:             * Creates a new UserAgentHeader based on the newly supplied List of product 
643:             * values.
644:             *
645:             * @param product the new List of values of the product.
646:             * @throws ParseException which signals that an error has been reached
647:             * unexpectedly while parsing the List of product values.
648:             * @return the newly created UserAgentHeader object.
649:             */
650:            public UserAgentHeader createUserAgentHeader(List product)
651:                    throws ParseException;
652:
653:            /**
654:             * Creates a new ViaHeader based on the newly supplied uri and branch values.
655:             *
656:             * @param host the new string value of the host.
657:             * @param port the new integer value of the port.
658:             * @param transport the new string value of the transport.
659:             * @param branch the new string value of the branch.
660:             * @throws ParseException which signals that an error has been reached
661:             * unexpectedly while parsing the host, transport or branch value.
662:             * @throws InvalidArgumentException if the supplied port is invalid.
663:             * @return the newly created ViaHeader object.
664:             */
665:            public ViaHeader createViaHeader(String host, int port,
666:                    String transport, String branch) throws ParseException,
667:                    InvalidArgumentException;
668:
669:            /**
670:             * Creates a new WWWAuthenticateHeader based on the newly supplied 
671:             * scheme value.
672:             *
673:             * @param scheme the new string value of the scheme.
674:             * @throws ParseException which signals that an error has been reached
675:             * unexpectedly while parsing the scheme values.
676:             * @return the newly created WWWAuthenticateHeader object.
677:             */
678:            public WWWAuthenticateHeader createWWWAuthenticateHeader(
679:                    String scheme) throws ParseException;
680:
681:            /**
682:             * Creates a new WarningHeader based on the newly supplied 
683:             * agent, code and comment values.
684:             *
685:             * @param agent the new string value of the agent.
686:             * @param code the new boolean integer of the code.
687:             * @param comment the new string value of the comment.
688:             * @throws ParseException which signals that an error has been reached
689:             * unexpectedly while parsing the agent or comment values.
690:             * @throws InvalidArgumentException if an invalid integer code is given for
691:             * the WarningHeader.
692:             * @return the newly created WarningHeader object.
693:             */
694:            public WarningHeader createWarningHeader(String agent, int code,
695:                    String comment) throws InvalidArgumentException,
696:                    ParseException;
697:
698:            /**
699:             * Creates a new SIP-ETag header with the supplied tag value
700:             * 
701:             * @param etag the new tag token
702:             * @return the newly created SIP-ETag header
703:             * @throws ParseException when an error occurs during parsing of the etag parameter
704:             * 
705:             * @since 1.2
706:             */
707:            public SIPETagHeader createSIPETagHeader(String etag)
708:                    throws ParseException;
709:
710:            /**
711:             * Creates a new SIP-If-Match header with the supplied tag value
712:             * 
713:             * @param etag the new tag token
714:             * @return the newly created SIP-If-Match header
715:             * @throws ParseException when an error occurs during parsing of the etag parameter
716:             * 
717:             * @since 1.2
718:             */
719:            public SIPIfMatchHeader createSIPIfMatchHeader(String etag)
720:                    throws ParseException;
721:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.