Source Code Cross Referenced for XINSCallConfig.java in  » Web-Services » xins » org » xins » client » 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 » Web Services » xins » org.xins.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: XINSCallConfig.java,v 1.22 2007/03/15 17:08:27 agoubard Exp $
003:         *
004:         * Copyright 2003-2007 Orange Nederland Breedband B.V.
005:         * See the COPYRIGHT file for redistribution and use restrictions.
006:         */
007:        package org.xins.client;
008:
009:        import org.xins.common.MandatoryArgumentChecker;
010:        import org.xins.common.http.HTTPCallConfig;
011:        import org.xins.common.http.HTTPMethod;
012:        import org.xins.common.service.CallConfig;
013:        import org.xins.common.text.TextUtils;
014:
015:        /**
016:         * Call configuration for the XINS service caller. The HTTP method can be configured.
017:         * By default it is set to <em>POST</em>.
018:         *
019:         * <p>This class is not thread safe</p>
020:         *
021:         * @version $Revision: 1.22 $ $Date: 2007/03/15 17:08:27 $
022:         * @author <a href="mailto:ernst@ernstdehaan.com">Ernst de Haan</a>
023:         *
024:         * @since XINS 1.1.0
025:         */
026:        public final class XINSCallConfig extends CallConfig {
027:
028:            /**
029:             * The underlying HTTP call config. Cannot be <code>null</code>.
030:             */
031:            private HTTPCallConfig _httpCallConfig;
032:
033:            /**
034:             * Constructs a new <code>XINSCallConfig</code> object.
035:             */
036:            public XINSCallConfig() {
037:
038:                // Construct an underlying HTTPCallConfig
039:                _httpCallConfig = new HTTPCallConfig();
040:
041:                // Configure the User-Agent header
042:                String userAgent = "XINS/Java Client Framework "
043:                        + Library.getVersion();
044:                _httpCallConfig.setUserAgent(userAgent);
045:
046:                // NOTE: HTTPCallConfig already defaults to HTTP POST
047:            }
048:
049:            /**
050:             * Returns an <code>HTTPCallConfig</code> object that corresponds with this
051:             * XINS call configuration object.
052:             *
053:             * @return
054:             *    an {@link HTTPCallConfig} object, never <code>null</code>.
055:             */
056:            HTTPCallConfig getHTTPCallConfig() {
057:                return _httpCallConfig;
058:            }
059:
060:            /**
061:             * Returns the HTTP method associated with this configuration.
062:             *
063:             * @return
064:             *    the HTTP method, never <code>null</code>.
065:             */
066:            public HTTPMethod getHTTPMethod() {
067:                return _httpCallConfig.getMethod();
068:            }
069:
070:            /**
071:             * Sets the HTTP method associated with this configuration.
072:             *
073:             * @param method
074:             *    the HTTP method to be associated with this configuration, cannot be
075:             *    <code>null</code>.
076:             *
077:             * @throws IllegalArgumentException
078:             *    if <code>method == null</code>.
079:             */
080:            public void setHTTPMethod(HTTPMethod method)
081:                    throws IllegalArgumentException {
082:
083:                // Check preconditions
084:                MandatoryArgumentChecker.check("method", method);
085:
086:                // Store the setting in the HTTP call configuration
087:                _httpCallConfig.setMethod(method);
088:            }
089:
090:            /**
091:             * Describes this configuration.
092:             *
093:             * @return
094:             *    the description of this configuration, should never be
095:             *    <code>null</code>, should never be empty and should never start or
096:             *    end with whitespace characters.
097:             */
098:            public String describe() {
099:
100:                String description = "XINS call config [failOverAllowed="
101:                        + isFailOverAllowed()
102:                        + "; method="
103:                        + TextUtils.quote(_httpCallConfig.getMethod()
104:                                .toString()) + ']';
105:
106:                return description;
107:            }
108:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.