Source Code Cross Referenced for SessionManager.java in  » Net » j2ssh » com » sshtools » common » ui » 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 » Net » j2ssh » com.sshtools.common.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  SSHTools - Java SSH2 API
003:         *
004:         *  Copyright (C) 2002-2003 Lee David Painter and Contributors.
005:         *
006:         *  Contributions made by:
007:         *
008:         *  Brett Smith
009:         *  Richard Pernavas
010:         *  Erwin Bolwidt
011:         *
012:         *  This program is free software; you can redistribute it and/or
013:         *  modify it under the terms of the GNU General Public License
014:         *  as published by the Free Software Foundation; either version 2
015:         *  of the License, or (at your option) any later version.
016:         *
017:         *  This program is distributed in the hope that it will be useful,
018:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
019:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
020:         *  GNU General Public License for more details.
021:         *
022:         *  You should have received a copy of the GNU General Public License
023:         *  along with this program; if not, write to the Free Software
024:         *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
025:         */
026:        package com.sshtools.common.ui;
027:
028:        import com.sshtools.common.configuration.SshToolsConnectionProfile;
029:
030:        import com.sshtools.j2ssh.SftpClient;
031:        import com.sshtools.j2ssh.SshEventAdapter;
032:        import com.sshtools.j2ssh.connection.Channel;
033:        import com.sshtools.j2ssh.connection.ChannelFactory;
034:        import com.sshtools.j2ssh.forwarding.ForwardingClient;
035:        import com.sshtools.j2ssh.session.SessionChannelClient;
036:
037:        import java.io.IOException;
038:
039:        /**
040:         * <p>This interface is used by the Session Provider framework to abstract
041:         * the SshClient connection away from the session provider. This restricts
042:         * the session to performing operations that are allowed by the controlling
043:         * application. For instance, the provider cannot simply diconnect the
044:         * connection, since the SshClient's disconnect method is not exposed, instead
045:         * a <code>requestDisconnect</code> method is provided allowing the controlling
046:         * application to simply ignore a disconnect since it may have other sessions
047:         * open.
048:         * </p>
049:         *
050:         * <p>
051:         * Most of the methods of this interface will simply be required to call the
052:         * identical method on SshClient.
053:         * </p>
054:         *
055:         * @author Lee David Painter
056:         * @version $Revision: 1.11 $
057:         */
058:        public interface SessionManager {
059:            /**
060:             * Opens a session on the managed connection.
061:             *
062:             * @return
063:             *
064:             * @throws IOException
065:             */
066:            public SessionChannelClient openSession() throws IOException;
067:
068:            /**
069:             * The session can call this method to apply any changes to the profile it
070:             * may have made.
071:             *
072:             * @param profile
073:             */
074:            public void applyProfileChanges(SshToolsConnectionProfile profile);
075:
076:            /**
077:             * Opens an SftpClient on the managed connection.
078:             *
079:             * @return
080:             *
081:             * @throws IOException
082:             */
083:            public SftpClient openSftpClient() throws IOException;
084:
085:            /**
086:             * Opens a channel on the managed connection.
087:             *
088:             * @param channel
089:             *
090:             * @return
091:             *
092:             * @throws IOException
093:             */
094:            public boolean openChannel(Channel channel) throws IOException;
095:
096:            /**
097:             * Determine if the managed connection is still connected.
098:             *
099:             * @return
100:             */
101:            public boolean isConnected();
102:
103:            /**
104:             * Called when a session wants to disconnect the connection. The manager
105:             * implementation should ideally not diconnect unless no other sessions
106:             * are open.
107:             *
108:             * @return
109:             */
110:            public boolean requestDisconnect();
111:
112:            /**
113:             * Gets the managed connections port forwarding client.
114:             *
115:             * @return
116:             */
117:            public ForwardingClient getForwardingClient();
118:
119:            /**
120:             * Send a global request
121:             *
122:             * @param requestname
123:             * @param wantreply
124:             * @param requestdata
125:             *
126:             * @return
127:             *
128:             * @throws IOException
129:             */
130:            public byte[] sendGlobalRequest(String requestname,
131:                    boolean wantreply, byte[] requestdata) throws IOException;
132:
133:            /**
134:             * Add an event handler to the managed connection
135:             *
136:             * @param eventHandler
137:             */
138:            public void addEventHandler(SshEventAdapter eventHandler);
139:
140:            /**
141:             * Gets the identification string supplied by the server.
142:             *
143:             * @return
144:             */
145:            public String getServerId();
146:
147:            /**
148:             * Returns the guessed EOL setting of the remote computer
149:             * @return
150:             */
151:            public int getRemoteEOL();
152:
153:            /**
154:             * Adds a channel factory to the managed connection.
155:             *
156:             * @param channelType
157:             * @param cf
158:             *
159:             * @throws IOException
160:             */
161:            public void allowChannelOpen(String channelType, ChannelFactory cf)
162:                    throws IOException;
163:
164:            /**
165:             * Get the current profile attached to the session.
166:             *
167:             * @return
168:             */
169:            public SshToolsConnectionProfile getProfile();
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.