Source Code Cross Referenced for TokenRequestObject.java in  » Groupware » Data-share » org » datashare » objects » 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 » Groupware » Data share » org.datashare.objects 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ----- BEGIN LICENSE BLOCK -----
002:         * Version: MPL 1.1
003:         *
004:         * The contents of this file are subject to the Mozilla Public License Version
005:         * 1.1 (the "License"); you may not use this file except in compliance with
006:         * the License. You may obtain a copy of the License at
007:         * http://www.mozilla.org/MPL/
008:         *
009:         * Software distributed under the License is distributed on an "AS IS" basis,
010:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011:         * for the specific language governing rights and limitations under the
012:         * License.
013:         *
014:         * The Original Code is the DataShare server.
015:         *
016:         * The Initial Developer of the Original Code is
017:         * Ball Aerospace & Technologies Corp, Fairborn, Ohio
018:         * Portions created by the Initial Developer are Copyright (C) 2001
019:         * the Initial Developer. All Rights Reserved.
020:         *
021:         * Contributor(s): Charles Wood <cwood@ball.com>
022:         *
023:         * ----- END LICENSE BLOCK ----- */
024:        /* RCS $Id: TokenRequestObject.java,v 1.1.1.1 2001/10/23 13:37:19 lizellaman Exp $
025:         * $Log: TokenRequestObject.java,v $
026:         * Revision 1.1.1.1  2001/10/23 13:37:19  lizellaman
027:         * initial sourceforge release
028:         *
029:         */
030:
031:        package org.datashare.objects;
032:
033:        /**
034:         * This class is used for both Client to Server communications and Server to Client
035:         * communications.  For Client to Server, the client can REQUEST a Token and CANCEL
036:         * a request.  The Client to Server CANCEL is used both for canceling a requested Token
037:         * that has not yet been received, and for returning a Token that has been received.
038:         * For the Server to Client, the server can GRANT the requested Token, and can
039:         * REVOKE a granted Token.  This object is sent over the commandStatusConnection, not
040:         * with the data channels.
041:         *
042:         */
043:        public class TokenRequestObject implements  java.io.Serializable {
044:            /**
045:             * this allows us to serialize this class without 'marshalling' errors.
046:             *
047:             */
048:            static final long serialVersionUID = 9058094854095490536L;
049:
050:            /**
051:             * Use this for typeOfRequest for
052:             */
053:            public static final int REQUEST = 0;
054:
055:            /**
056:             * Use this for typeOfRequest for
057:             */
058:            public static final int CANCEL = 1;
059:
060:            /**
061:             * Use this for typeOfRequest for
062:             */
063:            public static final int GRANT = 2;
064:
065:            /**
066:             * Use this for typeOfRequest for
067:             */
068:            public static final int REVOKE = 3;
069:
070:            /**
071:             * use typeOfRequest as index into this to get String version of Request
072:             */
073:            public static final String typeOfRequestStrings[] = { "Request",
074:                    "Cancel", "Grant", "Revoke" };
075:
076:            /**
077:             * This defines the type of history request, use REQUEST or CANCEL for Client to Server,
078:             * GRANT or REVOKE for Server to Client.
079:             */
080:            public int typeOfRequest = CANCEL; // default value
081:
082:            /**
083:             * The ADSKey string for the channel for which EJBs are desired (required for COUNT request)
084:             */
085:            public String tokenKey;
086:
087:            /**
088:             * The Session name for the Token desired
089:             */
090:            public String sessionName = "";
091:
092:            /**
093:             * The Channel name for the Token desired
094:             */
095:            public String channelName = "";
096:
097:            /**
098:             * Constructor, normally not used
099:             */
100:            public TokenRequestObject() {
101:            }
102:
103:            /**
104:             * Constructor, used except when typeOfRequest is REQUEST
105:             * @param typeOfRequest indicates what type of action is requested
106:             * @param tokenKey tokenKey for the channel whose Token we are making a request/response for
107:             */
108:            public TokenRequestObject(int typeOfRequest, String tokenKey) {
109:                this .typeOfRequest = typeOfRequest;
110:                this .tokenKey = tokenKey;
111:            }
112:
113:            /**
114:             * Constructor, required when typeOfRequest is REQUEST
115:             * @param typeOfRequest indicates what type of action is requested
116:             * @parma sessionName name of the Session for which a Token is requested, used to determine
117:             *            if the connection is active
118:             * @parma channelName name of the Channel for which a Token is requested, used to determine
119:             *            if the connection is active
120:             * @param tokenKey tokenKey for the channel whose Token we are making a request/response for
121:             */
122:            public TokenRequestObject(int typeOfRequest, String sessionName,
123:                    String channelName, String tokenKey) {
124:                this(typeOfRequest, tokenKey);
125:                this.sessionName = sessionName;
126:                this.channelName = channelName;
127:            }
128:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.