Java Doc for StandardPluginManager.java in  » Development » Java-Plugin-Framework » org » java » plugin » standard » 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 » Development » Java Plugin Framework » org.java.plugin.standard 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.java.plugin.PluginManager
      org.java.plugin.standard.StandardPluginManager

StandardPluginManager
final public class StandardPluginManager extends PluginManager (Code)
Standard implementation of plug-in manager.
version:
   $Id: StandardPluginManager.java,v 1.8 2007/04/07 12:41:01 ddimon Exp $

Inner Class :final static class EmptyPlugin extends Plugin

Field Summary
 Loglog
    

Constructor Summary
protected  StandardPluginManager(PluginRegistry aRegistry, PathResolver aPathResolver, PluginLifecycleHandler aLifecycleHandler)
     Creates instance of plug-in manager for given registry, path resolver and life cycle handler.

Method Summary
public  voidactivatePlugin(String id)
     Activates plug-in with given ID if it is not activated yet.
public  voiddeactivatePlugin(String id)
     Deactivates plug-in with given ID if it has been successfully activated before.
public  PluginDescriptor[]disablePlugin(PluginDescriptor descr)
     Disables plug-in (with dependencies) in this manager instance.
public  PluginDescriptor[]enablePlugin(PluginDescriptor descr, boolean includeDependings)
     Enables plug-in (or plug-ins) in this manager instance.
public  PathResolvergetPathResolver()
    
public  PlugingetPlugin(String id)
     Looks for plug-in with given ID and activates it if it is not activated yet.
public  PluginClassLoadergetPluginClassLoader(PluginDescriptor descr)
     Returns instance of plug-in's class loader and not tries to activate plug-in.
public  PlugingetPluginFor(Object obj)
     Looks for plug-in, given object belongs to.
public  PluginRegistrygetRegistry()
    
public  booleanisBadPlugin(PluginDescriptor descr)
    
public  booleanisPluginActivated(PluginDescriptor descr)
    
public  booleanisPluginActivating(PluginDescriptor descr)
    
public  booleanisPluginEnabled(PluginDescriptor descr)
    
public  Map<String, Identity>publishPlugins(PluginLocation[] locations)
     Registers plug-ins and their locations with this plug-in manager.
public  voidregisterListener(EventListener listener)
     Registers plug-in manager event listener.
synchronized  voidregistryChangeHandler(RegistryChangeData data)
     Method to handle plug-in registry change events.
public synchronized  voidshutdown()
     Shuts down the framework.
public  voidunregisterListener(EventListener listener)
     Unregisters manager event listener.

Field Detail
log
Log log(Code)




Constructor Detail
StandardPluginManager
protected StandardPluginManager(PluginRegistry aRegistry, PathResolver aPathResolver, PluginLifecycleHandler aLifecycleHandler)(Code)
Creates instance of plug-in manager for given registry, path resolver and life cycle handler.
Parameters:
  aRegistry - some implementation of plug-in registry interface
Parameters:
  aPathResolver - some implementation of path resolver interface
Parameters:
  aLifecycleHandler - an implementation of plug-in life cycle handler
See Also:   StandardObjectFactory




Method Detail
activatePlugin
public void activatePlugin(String id) throws PluginLifecycleException(Code)
Activates plug-in with given ID if it is not activated yet.
Parameters:
  id - plug-in ID
throws:
  PluginLifecycleException - if plug-in can't be found or activated



deactivatePlugin
public void deactivatePlugin(String id)(Code)
Deactivates plug-in with given ID if it has been successfully activated before. Note that this method will effectively deactivate all plug-ins that depend on the given plug-in.
Parameters:
  id - plug-in ID



disablePlugin
public PluginDescriptor[] disablePlugin(PluginDescriptor descr)(Code)
Disables plug-in (with dependencies) in this manager instance. Disabled plug-in can't be activated although it may be valid and successfully registered with plug-in registry. Before disabling, plug-in will be deactivated if it was successfully activated.
Be careful with this method as it can effectively disable large set of inter-depending plug-ins and your application may become unstable or even disabled as whole.
Parameters:
  descr - descriptor of plug-in to be disabled descriptors of plug-ins that was actually disabled



enablePlugin
public PluginDescriptor[] enablePlugin(PluginDescriptor descr, boolean includeDependings)(Code)
Enables plug-in (or plug-ins) in this manager instance.
Parameters:
  descr - descriptor of plug-in to be enabled
Parameters:
  includeDependings - if true, depending plug-ins will be alsoenabled descriptors of plug-ins that was actually enabled
See Also:   StandardPluginManager.disablePlugin(PluginDescriptor)



getPathResolver
public PathResolver getPathResolver()(Code)

See Also:   org.java.plugin.PluginManager.getPathResolver



getPlugin
public Plugin getPlugin(String id) throws PluginLifecycleException(Code)
Looks for plug-in with given ID and activates it if it is not activated yet. Note that this method will never return null.
Parameters:
  id - plug-in ID found plug-in
throws:
  PluginLifecycleException - if plug-in can't be found or activated



getPluginClassLoader
public PluginClassLoader getPluginClassLoader(PluginDescriptor descr)(Code)
Returns instance of plug-in's class loader and not tries to activate plug-in. Use this method if you need to get access to plug-in resources and don't want to cause plug-in activation.
Parameters:
  descr - plug-in descriptor class loader instance for plug-in with given descriptor



getPluginFor
public Plugin getPluginFor(Object obj)(Code)
Looks for plug-in, given object belongs to.
Parameters:
  obj - any object that maybe belongs to some plug-in plug-in or null if given object doesn't belong toany plug-in (possibly it is part of "host" application) and thusdoesn't managed by the Framework directly or indirectly



getRegistry
public PluginRegistry getRegistry()(Code)

See Also:   org.java.plugin.PluginManager.getRegistry



isBadPlugin
public boolean isBadPlugin(PluginDescriptor descr)(Code)

Parameters:
  descr - plug-in descriptor true if plug-in disabled as it's activation fails



isPluginActivated
public boolean isPluginActivated(PluginDescriptor descr)(Code)

Parameters:
  descr - plug-in descriptor true if plug-in with given descriptor is activated



isPluginActivating
public boolean isPluginActivating(PluginDescriptor descr)(Code)

Parameters:
  descr - plug-in descriptor true if plug-in is currently activating



isPluginEnabled
public boolean isPluginEnabled(PluginDescriptor descr)(Code)

Parameters:
  descr - plug-in descriptor true if given plug-in is disabled in this manager



publishPlugins
public Map<String, Identity> publishPlugins(PluginLocation[] locations) throws JpfException(Code)
Registers plug-ins and their locations with this plug-in manager. You should use this method to register new plug-ins to make them available for activation with this manager instance (compare this to PluginRegistry.register(URL[]) method that just makes plug-in's meta-data available for reading and doesn't "know" where are things actually located).
Parameters:
  locations - plug-in locations data map where keys are manifest URL's and values are registeredplug-ins or plug-in fragments, URL's for unprocessed manifestsare not included
throws:
  JpfException - if given plug-ins can't be registered or published (optionalbehavior)



registerListener
public void registerListener(EventListener listener)(Code)
Registers plug-in manager event listener. If given listener has been registered before, this method will throw an IllegalArgumentException .
Parameters:
  listener - new manager event listener



registryChangeHandler
synchronized void registryChangeHandler(RegistryChangeData data)(Code)
Method to handle plug-in registry change events.
Parameters:
  data - registry change data holder



shutdown
public synchronized void shutdown()(Code)
Shuts down the framework.
Calling this method will deactivate all active plug-ins in order, reverse to the order they was activated. It also releases all resources allocated by this manager (class loaders, plug-in descriptors etc.). All disabled plug-ins will be marked as "enabled", all registered event listeners will be unregistered.



unregisterListener
public void unregisterListener(EventListener listener)(Code)
Unregisters manager event listener. If given listener hasn't been registered before, this method will throw an IllegalArgumentException .
Parameters:
  listener - registered listener



Fields inherited from org.java.plugin.PluginManager
final public static String VERSION(Code)(Java Doc)
final public static String VERSION_PROPERTY(Code)(Java Doc)

Methods inherited from org.java.plugin.PluginManager
abstract public void activatePlugin(String id) throws PluginLifecycleException(Code)(Java Doc)
abstract public void deactivatePlugin(String id)(Code)(Java Doc)
abstract public PluginDescriptor[] disablePlugin(PluginDescriptor descr)(Code)(Java Doc)
final protected void disposeClassLoader(PluginClassLoader cl)(Code)(Java Doc)
abstract public PluginDescriptor[] enablePlugin(PluginDescriptor descr, boolean includeDependings)(Code)(Java Doc)
abstract public PathResolver getPathResolver()(Code)(Java Doc)
abstract public Plugin getPlugin(String id) throws PluginLifecycleException(Code)(Java Doc)
abstract public PluginClassLoader getPluginClassLoader(PluginDescriptor descr)(Code)(Java Doc)
abstract public Plugin getPluginFor(Object obj)(Code)(Java Doc)
abstract public PluginRegistry getRegistry()(Code)(Java Doc)
final protected void initPlugin(Plugin plugin, PluginDescriptor descr)(Code)(Java Doc)
abstract public boolean isBadPlugin(PluginDescriptor descr)(Code)(Java Doc)
abstract public boolean isPluginActivated(PluginDescriptor descr)(Code)(Java Doc)
abstract public boolean isPluginActivating(PluginDescriptor descr)(Code)(Java Doc)
abstract public boolean isPluginEnabled(PluginDescriptor descr)(Code)(Java Doc)
public static PluginManager lookup(Object obj)(Code)(Java Doc)
final protected void notifyClassLoader(PluginClassLoader cl)(Code)(Java Doc)
abstract public Map<String, Identity> publishPlugins(PluginLocation[] locations) throws JpfException(Code)(Java Doc)
abstract public void registerListener(EventListener listener)(Code)(Java Doc)
abstract public void shutdown()(Code)(Java Doc)
final protected void startPlugin(Plugin plugin) throws Exception(Code)(Java Doc)
final protected void stopPlugin(Plugin plugin) throws Exception(Code)(Java Doc)
abstract public void unregisterListener(EventListener listener)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.