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


001:        /*
002:         * $Id: CallResult.java,v 1.23 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.common.service;
008:
009:        import java.io.Serializable;
010:
011:        import org.xins.common.MandatoryArgumentChecker;
012:
013:        /**
014:         * Result of a call to a service. The actual result is returned, combined with
015:         * links to the services that failed and a link to the service to which the
016:         * call succeeded.
017:         *
018:         * <p>This is an <code>abstract</code> class. Service callers return a
019:         * specific kind of result, which is derived from this class.
020:         *
021:         * @version $Revision: 1.23 $ $Date: 2007/03/15 17:08:27 $
022:         * @author <a href="mailto:ernst@ernstdehaan.com">Ernst de Haan</a>
023:         *
024:         * @since XINS 1.0.0
025:         */
026:        public abstract class CallResult implements  Serializable {
027:
028:            /**
029:             * The call request. This field cannot be <code>null</code>.
030:             */
031:            private final CallRequest _request;
032:
033:            /**
034:             * The target for which the call succeeded. This field cannot be
035:             * <code>null</code>.
036:             */
037:            private final TargetDescriptor _succeededTarget;
038:
039:            /**
040:             * The call duration, in milliseconds.
041:             */
042:            private final long _duration;
043:
044:            /**
045:             * The list of <code>CallException</code>s. This field may be
046:             * <code>null</code>.
047:             */
048:            private final CallExceptionList _exceptions;
049:
050:            /**
051:             * Constructs a new <code>CallResult</code> object.
052:             *
053:             * @param request
054:             *    the call request that resulted in this result, cannot be
055:             *    <code>null</code>.
056:             *
057:             * @param succeededTarget
058:             *    the target for which the call succeeded, cannot be <code>null</code>.
059:             *
060:             * @param duration
061:             *    the call duration in milliseconds, cannot be a negative number.
062:             *
063:             * @param exceptions
064:             *    the list of {@link CallException}s, or <code>null</code> if the first
065:             *    call attempt succeeded.
066:             *
067:             * @throws IllegalArgumentException
068:             *    if <code>request         ==   null
069:             *          || succeededTarget ==   null
070:             *          || duration        &lt; 0L</code>.
071:             */
072:            protected CallResult(CallRequest request,
073:                    TargetDescriptor succeededTarget, long duration,
074:                    CallExceptionList exceptions)
075:                    throws IllegalArgumentException {
076:
077:                // Check preconditions
078:                MandatoryArgumentChecker.check("request", request,
079:                        "succeededTarget", succeededTarget);
080:                if (duration < 0L) {
081:                    throw new IllegalArgumentException("duration (" + duration
082:                            + "L) < 0L");
083:                }
084:
085:                // Set fields
086:                _request = request;
087:                _succeededTarget = succeededTarget;
088:                _duration = duration;
089:                _exceptions = exceptions;
090:            }
091:
092:            /**
093:             * Returns the call request.
094:             *
095:             * @return
096:             *    the {@link CallRequest}, never <code>null</code>.
097:             */
098:            public final CallRequest getRequest() {
099:                return _request;
100:            }
101:
102:            /**
103:             * Returns the target for which the call succeeded.
104:             *
105:             * @return
106:             *    the {@link TargetDescriptor} for which the call succeeded, not
107:             *    <code>null</code>.
108:             */
109:            public final TargetDescriptor getSucceededTarget() {
110:                return _succeededTarget;
111:            }
112:
113:            /**
114:             * Returns the call duration, in milliseconds.
115:             *
116:             * @return
117:             *    the duration of the succeeded call, in milliseconds, guaranteed to
118:             *    be a non-negative number.
119:             */
120:            public final long getDuration() {
121:                // XXX: Duration of succeeded call or of the complete attempt?
122:                return _duration;
123:            }
124:
125:            /**
126:             * Returns the list of <code>CallException</code>s.
127:             *
128:             * @return
129:             *    the {@link CallException}s, collected in a {@link CallExceptionList}
130:             *    object, or <code>null</code> if the first call attempt succeeded.
131:             */
132:            public final CallExceptionList getExceptions() {
133:                return _exceptions;
134:            }
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.