Source Code Cross Referenced for DataShareConnectionDescriptor.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: DataShareConnectionDescriptor.java,v 1.1.1.1 2001/10/23 13:37:20 lizellaman Exp $
025:         * $Log: DataShareConnectionDescriptor.java,v $
026:         * Revision 1.1.1.1  2001/10/23 13:37:20  lizellaman
027:         * initial sourceforge release
028:         *
029:         */
030:
031:        package org.datashare.objects;
032:
033:        import java.net.InetAddress;
034:        import java.net.Socket;
035:
036:        /**
037:         * This class is used to describe a DataShareConnection socket and is sent over the
038:         * CommandStatus Channel.  We do not actually use
039:         * sockets in this class because they are not serializable.  The information in
040:         * an instance of this class allows a socket to be (re)created.  This class is used by
041:         * clients only to create a connection.  The DataShareServer should not use this class
042:         * to create connections.  This object is sent inside another object.
043:         */
044:        public class DataShareConnectionDescriptor implements 
045:                java.io.Serializable {
046:            /**
047:             * this allows us to serialize this class without 'marshalling' errors.
048:             *
049:             */
050:            static final long serialVersionUID = 9030593813711490503L;
051:
052:            public InetAddress serverIP;
053:            public int serverPort;
054:            public InetAddress clientIP;
055:            public int clientPort;
056:            public String name;
057:            public int type; // defined by ChannelDescription
058:            public String clientKeyValue; // keyValue for the client of this connection
059:            public String keyValue; // should always be unique for a VM
060:            public ChannelDescription channelDescription;
061:            public String sessionName;
062:            public String tokenKey = ""; // the key that makes this Channel unique
063:            public String databaseID; // the ADSKey string for this channel, needs to be set (if persist is true) before sending to clients
064:
065:            public boolean constantPing = false;
066:            public boolean completelySpecified = false;
067:
068:            /**
069:             * This constructor is used when the connection has already be established and activated
070:             */
071:            public DataShareConnectionDescriptor(String sessionName,
072:                    ChannelDescription channelDescription,
073:                    String clientKeyValue, InetAddress serverIP,
074:                    int serverPort, InetAddress clientIP, int clientPort) {
075:                this .sessionName = sessionName;
076:                this .channelDescription = channelDescription;
077:                name = channelDescription.channelName;
078:                this .clientKeyValue = clientKeyValue;
079:                this .type = channelDescription.type;
080:                this .serverIP = serverIP;
081:                this .serverPort = serverPort;
082:                this .clientIP = clientIP;
083:                this .clientPort = clientPort;
084:                keyValue = name + "-" + new Integer(type) + "-"
085:                        + serverIP.getHostAddress() + ":" + serverPort
086:                        + clientIP.getHostAddress() + ":" + clientPort;
087:                tokenKey = sessionName + "." + channelDescription.channelName;
088:                completelySpecified = true;
089:            }
090:
091:            /**
092:             * This constructor is used to describe a connection, prior to establishing it
093:             */
094:            public DataShareConnectionDescriptor(String sessionName,
095:                    ChannelDescription channelDescription,
096:                    InetAddress serverIP, int serverPort) {
097:                this .sessionName = sessionName;
098:                this .channelDescription = channelDescription;
099:                name = channelDescription.channelName;
100:                this .type = channelDescription.type;
101:                this .serverIP = serverIP;
102:                this .serverPort = serverPort;
103:                keyValue = name + "-" + new Integer(type) + "-"
104:                        + serverIP.getHostAddress() + ":" + serverPort;
105:                tokenKey = sessionName + "." + channelDescription.channelName;
106:                completelySpecified = false;
107:            }
108:
109:            //   public void
110:            //   setTokenKey(String tokenKey)
111:            //      {
112:            //      this.tokenKey = tokenKey;
113:            //      }
114:
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.