Source Code Cross Referenced for Provider.java in  » Byte-Code » PROSE » ch » ethz » jvmai » 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 » Byte Code » PROSE » ch.ethz.jvmai 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //
002:        //  This file is part of the prose package.
003:        //
004:        //  The contents of this file are subject to the Mozilla Public License
005:        //  Version 1.1 (the "License"); you may not use this file except in
006:        //  compliance with 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 prose.
015:        //
016:        //  The Initial Developer of the Original Code is Andrei Popovici. Portions
017:        //  created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
018:        //  All Rights Reserved.
019:        //
020:        //  Contributor(s):
021:        // $Id: Provider.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
022:        // =====================================================================
023:        //
024:        // (history at end)
025:        //
026:
027:        package ch.ethz.jvmai;
028:
029:        // used packages/classes
030:        import ch.ethz.jvmai.JVMAspectInterface;
031:
032:        /**
033:         * Class Provider builds the connection between the
034:         * jvmai-system and the user-application. Every virtual
035:         * machine (better: every jvmai-implementation) implements
036:         * a provider. Method <code>getProvider</code> is used to
037:         * get an instace of a provider specified by a classname.
038:         * This provider connects to the jvmai-implementation and
039:         * tries to get references to the aspect- and
040:         * info-interface. Applications can then retrieve this
041:         * references by calling <code>getAspectInterface()</code>
042:         * and <code>getInfoInterface()</code>.
043:         *
044:         * @version	$Revision: 1.1.1.1 $
045:         * @author	Stephan Markwalder
046:         */
047:        public abstract class Provider {
048:
049:            protected Provider() {
050:            }
051:
052:            /**
053:             * Gets an implementation of a provider specified by the
054:             * providers classname.
055:             * This method may fail for many different reasons.
056:             * First, the class may not be found. If the class can
057:             * be found and linked without errors, an instance of
058:             * this provider is created. Depending on the kind of
059:             * jvmai-implementation, providers try to connect to
060:             * this implementation or the virtual machine itself.
061:             * If the specified provider (parameter
062:             * <code>classname</code>) is not able to establish this
063:             * connection, it will throw a JVMAIRuntimeException.
064:             *
065:             * @param classname Name of the provider-class
066:             *                 (with package-name).
067:             * @return An instance of a provider.
068:             * @exception JVMAIRuntimeException Use <code>JVMAIRuntimeException.getMessage()</code>
069:             *                                  to retrieve a description.
070:             */
071:            public static final Provider getProvider(String classname) {
072:                Provider provider = null;
073:                try {
074:                    Class providerClass = Class.forName(classname);
075:                    provider = (Provider) providerClass.newInstance();
076:                } catch (Exception e) {
077:                    throw new JVMAIRuntimeException(e.toString());
078:                }
079:                return provider;
080:            }
081:
082:            /**
083:             * Returns the apect-interface of the jvmai-system
084:             * supported by this provider.
085:             */
086:            public abstract JVMAspectInterface getAspectInterface();
087:        }
088:
089:        //======================================================================
090:        //
091:        // $Log: Provider.java,v $
092:        // Revision 1.1.1.1  2003/07/02 15:30:50  apopovic
093:        // Imported from ETH Zurich
094:        //
095:        // Revision 1.1  2003/05/05 14:02:25  popovici
096:        // renaming from runes to prose
097:        //
098:        // Revision 1.6  2003/03/04 11:27:10  popovici
099:        // Important refactorization step (march):
100:        // - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
101:        // - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
102:        //   structures
103:        //
104:        // Revision 1.5  2002/03/28 13:48:31  popovici
105:        // Mozilla-ified
106:        //
107:        // Revision 1.4  2002/02/13 12:25:11  smarkwal
108:        // spaces/tabs alignment corrected
109:        //
110:        // Revision 1.3  2002/02/04 13:11:12  smarkwal
111:        // method getProvider(...) declared final
112:        //
113:        // Revision 1.2  2002/01/24 12:52:14  smarkwal
114:        // Constructor is now 'protected'. Comments added.
115:        //
116:        // Revision 1.1  2001/12/14 15:01:19  smarkwal
117:        // Initial Revision
118:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.