exfex-cvs-commit Mailing List for Extended Form of examination (Page 5)
Status: Planning
Brought to you by:
mstsxfx
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(93) |
Oct
(134) |
Nov
(29) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
|
From: Michal H. <ms...@us...> - 2005-10-18 17:53:48
|
Update of /cvsroot/exfex/exfex/source/exfex/common/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13685/source/exfex/common/pluginsystem Modified Files: IPlugin.java Context.java Log Message: doc update Index: Context.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/pluginsystem/Context.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Context.java 8 Oct 2005 17:57:42 -0000 1.1 --- Context.java 18 Oct 2005 17:53:39 -0000 1.2 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.2 2005/10/18 17:53:39 mstsxfx + * doc update + * * Revision 1.1 2005/10/08 17:57:42 mstsxfx * IContext implementation *************** *** 12,16 **** /** ! * TODO doc * * <p> --- 15,19 ---- /** ! * Helper implementator of IContext interface. * * <p> *************** *** 19,23 **** * </pre> * ! * @author cz2p10d4 */ public class Context implements IContext --- 22,26 ---- * </pre> * ! * @author msts */ public class Context implements IContext *************** *** 25,31 **** Properties context; ! /** ! * @inheritDoc ! * */ public Context(Properties prop) --- 28,34 ---- Properties context; ! /** Initialize constructor.. ! * Uses setContextMethod for intialization. ! * @param prop Properties object used for context setting. */ public Context(Properties prop) *************** *** 34,40 **** } ! /** ! * @inheritDoc * */ public Properties getContext() --- 37,43 ---- } ! /** Returns context in Properties object. * + * @return Properties instance with context. */ public Properties getContext() *************** *** 43,53 **** } ! /** ! * @inheritDoc ! * */ ! public void setContext(Properties context) { ! this.context=context; } --- 46,58 ---- } ! /** Sets context from given properties. ! * @param prop Properties object used for context setting. ! * @return Old context in properties object. */ ! public Properties setContext(Properties prop) { ! Properties old=this.context; ! this.context=prop; ! return old; } Index: IPlugin.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/pluginsystem/IPlugin.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** IPlugin.java 16 Oct 2005 09:27:29 -0000 1.12 --- IPlugin.java 18 Oct 2005 17:53:39 -0000 1.13 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.13 2005/10/18 17:53:39 mstsxfx + * doc update + * * Revision 1.12 2005/10/16 09:27:29 mstsxfx * extends Serializable for RMI purposes *************** *** 515,519 **** * when starting to purge plugin. * ! * @see exfex.common.pluginsystem.PluginManager#purge(IPlugin) */ public void unRegisterMe(); --- 518,522 ---- * when starting to purge plugin. * ! * @see exfex.common.pluginsystem.PluginManager#remove(IPlugin) */ public void unRegisterMe(); |
From: Michal H. <ms...@us...> - 2005-10-18 17:53:34
|
Update of /cvsroot/exfex/exfex/source/exfex/common/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13638/source/exfex/common/pluginsystem Modified Files: PluginManager.java Log Message: logs added Index: PluginManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/pluginsystem/PluginManager.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PluginManager.java 17 Oct 2005 19:53:43 -0000 1.20 --- PluginManager.java 18 Oct 2005 17:53:23 -0000 1.21 *************** *** 6,9 **** --- 6,12 ---- * * $Log$ + * Revision 1.21 2005/10/18 17:53:23 mstsxfx + * logs added + * * Revision 1.20 2005/10/17 19:53:43 mstsxfx * code consolidation, documentation update *************** *** 1141,1152 **** }catch(ClassNotFoundException e) { throw new PluginLoadException(new String("Class "+name+" not found"),e); } catch(ClassCastException e) { ! throw new PluginLoadException(new String("Class "+name+" is not correct plugin type"),e); } catch(Throwable e) { throw new PluginLoadException(new String("Error during "+name+" instancing ("+e.getMessage()+")"),e); } --- 1144,1158 ---- }catch(ClassNotFoundException e) { + log(ILogger.Level.ERROR,"Unable to find "+name+" class"); throw new PluginLoadException(new String("Class "+name+" not found"),e); } catch(ClassCastException e) { ! log(ILogger.Level.ERROR,"Class("+name+") is not plugin."); ! throw new PluginLoadException(new String("Class("+name+") is not correct plugin type"),e); } catch(Throwable e) { + log(ILogger.Level.ERROR,"Unexpected error during class ("+name+") fetching (reason="+e.getMessage()+")"); throw new PluginLoadException(new String("Error during "+name+" instancing ("+e.getMessage()+")"),e); } |
From: Michal H. <ms...@us...> - 2005-10-18 17:50:59
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/displaysystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12883/source/exfex/common/remote/displaysystem Modified Files: IRemoteSessionManager.java Added Files: IRemoteSessionManagerFactory.java Log Message: remote view of session manager + plugin interface --- NEW FILE: IRemoteSessionManagerFactory.java --- /* * $RCSfile: IRemoteSessionManagerFactory.java,v $ * * $Log: IRemoteSessionManagerFactory.java,v $ * Revision 1.1 2005/10/18 17:50:03 mstsxfx * remote view of session manager + plugin interface * */ package exfex.common.remote.displaysystem; import exfex.common.pluginsystem.IPlugin; /** Interface for plugins factories for remote SessionManager view. * * Plugins produce IRemoteSessionManager instances used for remote view to the * local SessionManager instance. Created (by get {@link #remoteView(String)} * method) instance (remote objects) should perform security and authorization * checking. * <br> * This plugin is local (not intended for remote invocation). Remote view * (produced by plugin) has to be registered to the Naming service to be * accessible as remote (RMI) service. This can be done automaticaly in * <code>regiterMe</code> method, but it's not very recomended, because it can * lead to service name clashing (Read documentation of plugin for details of * concrete using and registration process). * <br> * All such plugins should registers to the PluginManager. * * @see exfex.common.remote.displaysystem.IRemoteSessionManager * <pre> * Changes: * 18.10.2005 msts - created * </pre> * @author msts */ public interface IRemoteSessionManagerFactory extends IPlugin { /** Returns remote view of SessionManager instance with given name. * Gets SessionManager with given name from the PluginManager and * creates remote view of the manager. * * @param managerName of the manager. * @return instance of IRemoteSessionManager type. */ IRemoteSessionManager remoteView(String managerName); } Index: IRemoteSessionManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/remote/displaysystem/IRemoteSessionManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IRemoteSessionManager.java 17 Oct 2005 19:59:15 -0000 1.2 --- IRemoteSessionManager.java 18 Oct 2005 17:50:03 -0000 1.3 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.3 2005/10/18 17:50:03 mstsxfx + * remote view of session manager + plugin interface + * * Revision 1.2 2005/10/17 19:59:15 mstsxfx * doc update *************** *** 24,32 **** import exfex.common.security.IIdentity; ! /** Session Manager remote interface. ! * This interface is inteded for remote (client) use. Each method has * {@link exfex.common.remote.security.IRemoteIdentity} parameter to be able to * check caller permisions to the operation. If caller (defined by its id) is ! * not allowed to perform operation PluginSecurityException is thrown. * * <pre> --- 27,43 ---- import exfex.common.security.IIdentity; ! ! ! /** Session Manager remote view interface. ! * ! * This interface is intended for remote (client) use. Each method has * {@link exfex.common.remote.security.IRemoteIdentity} parameter to be able to * check caller permisions to the operation. If caller (defined by its id) is ! * not allowed to perform operation PluginSecurityException is thrown. ! * <br> ! * Instance of this type should be product of IRemoteSessionManagerFactory type ! * plugin. To use it remotly as a service, it has to be registered on Naming ! * service. ! * See concrete plugin documentation on registering detailes. * * <pre> *************** *** 41,45 **** /** Returns all top level sessions. * ! * Returns all sessions created by registerSession method. * <p> * NOTE: All returned sessions was registered in the moment of method --- 52,56 ---- /** Returns all top level sessions. * ! * Returns all sessions created by <code>registerSession</code> method. * <p> * NOTE: All returned sessions was registered in the moment of method *************** *** 60,67 **** * * Creates new session using sessionplugin (calls ! * sessionplugin.getSession method) and insert it to the sessions tree. ! * This is the way how to create root (top level) sessions. ! * When session is created, sets its sessionManager and pluginManager ! * fields and finaly session's parent (to null) and state (to CREATED). * * @param id Identity of the caller caller. --- 71,77 ---- * * Creates new session using sessionplugin (calls ! * <code>sessionplugin.getSession</code> method) and insert it to the ! * sessions tree. This is the way how to create root (top level) ! * sessions. * * @param id Identity of the caller caller. *************** *** 72,76 **** * operation. */ ! public ISession registerSession(IIdentity id, ISessionFactory sessionplugin) throws RemoteException, PluginSecurityException; --- 82,86 ---- * operation. */ ! public ISession registerSession(IRemoteIdentity id, ISessionFactory sessionplugin) throws RemoteException, PluginSecurityException; *************** *** 78,86 **** * * This method will create new subsession of given session using ! * sessionplugin (calls sessionplugin.getSession method) and insert ! * new session to the session tree (as a child of the session). ! * This is the way how to create gui subprocess. ! * When session is created, sets session's SessionManager, pluginManager ! * and session's parent (to session) and state (to CREATED). * * @see IPlugin#getInstance --- 88,94 ---- * * This method will create new subsession of given session using ! * sessionplugin (calls <code>sessionplugin.getSession</code> method) ! * and insert new session to the session tree (as a child of the ! * session). This is the way how to create gui subprocess. * * @see IPlugin#getInstance *************** *** 98,122 **** /** Kills given session. * ! * Destroy given session. ! * Session can be destroyed in two ways: ! * <ul> ! * <li>By session itself (e.g. when Session wants to finish, it will ! * call its kill method). Session's kill method is responsible for ! * cleaning up (destroying gui and so on), setting session's state ! * to FINISH and call this method. ! * <li>By someone else (e.g. system is shuting down and Session manager ! * wants to kill all sessions). In such situation session's state is ! * different from FINISH and so clean up has to be done. So session's ! * kill method should be called first (this will do all needed, and ! * set session's state to FINISH). Note that session's kill method ! * will call this method. ! * </ul> ! * When session is ready to be killed (state is FINISH) session should ! * be removed from the session tree and all its children should be ! * closed too. * <p> * NOTE: don't use children kill method, because it can call killSession * method! Use rather child's close method. * * @see ISession#kill * @param id Identity of the caller caller. --- 106,116 ---- /** Kills given session. * ! * Destroyes given session. * <p> * NOTE: don't use children kill method, because it can call killSession * method! Use rather child's close method. * + * @see exfex.common.displaysystem.ISessionManager for more details + * about killing process. * @see ISession#kill * @param id Identity of the caller caller. |
From: Michal H. <ms...@us...> - 2005-10-18 17:48:18
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12302/source/exfex/common/remote/pluginsystem Added Files: IRemotePluginManagerFactory.java Log Message: remote plugin manager view plugin interface --- NEW FILE: IRemotePluginManagerFactory.java --- /* * $RCSfile: IRemotePluginManagerFactory.java,v $ * * $Log: IRemotePluginManagerFactory.java,v $ * Revision 1.1 2005/10/18 17:48:10 mstsxfx * remote plugin manager view plugin interface * */ package exfex.common.remote.pluginsystem; import exfex.common.pluginsystem.IPlugin; /** Interface for plugins factories for remote PluginManager view. * * Plugins produce IRemotePluginManager instances used for remote view to the * local PluginManager instance. Created (by get {@link #remoteView()} method) * instance (remote objects) should perform security and authorization checking. * <br> * This plugin is local (not intended for remote invocation). Remote view * (produced by plugin) has to be registered to the Naming service to be * accessible as remote (RMI) service. This can be done automaticaly in * <code>regiterMe</code> method, but it's not very recomended, because it can * lead to service name clashing (Read documentation of plugin for details of * concrete using and registration process). * <br> * It's strongly recomeneded, that this factory would return always the same * instance (maintained object of this plugin follows singleton pattern). * * @see exfex.common.remote.pluginsystem.IRemotePluginManager * <pre> * Changes: * 18.10.2005 msts - created * </pre> * * @author msts */ public interface IRemotePluginManagerFactory extends IPlugin { /** Returns instance of remote view to the PluginManager. * * @return instance of IRemotePluginManager type. */ IRemotePluginManager remoteView(); } |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/security In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/remote/security Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for remote interfaces and classes used be security mechanisms. <h2>Package Specification</h2> This package contains all classes and interfaces for security system remote usage. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/plugins/displaysystem Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for plugins used by display system. <h2>Package Specification</h2> This package contains all plugins used for display system. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/remote Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Basic package for common remote interfaces. <h2>Package Specification</h2> This package contains all classes and interfaces for common remote usage. <br> Interafaces and classes from this package are needed for RMI mechanism on both server and clients sides. Package contains subpackages to keep order and easy orientation. All interfaces defined in any of subpackage should start with IRemote prefix to emphatise that it is remote view of suffix defined resource. <pre> // Example of plugin manager remote interface declaration public interface IRemotePluginManager extends Remote { // methods declaration } </pre> All remote interfaces and classes should follow RMI specification (basicly interafces should extend Remote interface and classes should extend UnicastRemoteObject; all methods should contain throws RemoteException in declaration). </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/plugins/displaysystem/swing Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for Swing plugins used by display system. <h2>Package Specification</h2> This package contains all Swing plugins used for display system. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/remote/pluginsystem Modified Files: package.html Log Message: package info Index: package.html =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** package.html 17 Oct 2005 19:57:46 -0000 1.1 --- package.html 18 Oct 2005 17:47:15 -0000 1.2 *************** *** 6,18 **** <body bgcolor="white"> ! Package for Remote plugin system service. <h2>Package Specification</h2> ! This package contains all classes and interfaces for remote plugin system view. ! <br> ! Defines remote interface for plugin manager and its implementation which should ! be used as stup implementation. Before using rmic command should be used to ! create RMI stub. </body> --- 6,17 ---- <body bgcolor="white"> ! Package for Remote plugin system interfaces and classes. <h2>Package Specification</h2> ! This package contains all classes and interfaces for remote usage. All ! interfaces should exdend Remote interface and classes extend UnicastRemoteObject. ! Plugins with remote specialization should be placed in ! exfex.common.plugins.remote.pluginsystem package, not here. </body> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:23
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/displaysystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/remote/displaysystem Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for remote interfaces and classes used be DisplaySystem. <h2>Package Specification</h2> This package contains all classes and interfaces for display system remote usage. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:23
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/remote In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12057/source/exfex/common/plugins/remote Added Files: package.html Log Message: package info --- NEW FILE: package.html --- |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:17
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/remote In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12008/source/exfex/common/plugins/remote Log Message: Directory /cvsroot/exfex/exfex/source/exfex/common/plugins/remote added to the repository |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:17
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12008/source/exfex/common/plugins/displaysystem/swing Log Message: Directory /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem/swing added to the repository |
From: Michal H. <ms...@us...> - 2005-10-18 17:47:17
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12008/source/exfex/common/plugins/displaysystem Log Message: Directory /cvsroot/exfex/exfex/source/exfex/common/plugins/displaysystem added to the repository |
From: Michal H. <ms...@us...> - 2005-10-18 17:46:26
|
Update of /cvsroot/exfex/exfex/source/exfex/common/security In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11753/source/exfex/common/security Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Basic package for security system. <h2>Package Specification</h2> This package contains all classes and interfaces for security system. <br> TODO </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:46:10
|
Update of /cvsroot/exfex/exfex/source/exfex/common/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11664/source/exfex/common/utils Modified Files: State.java Added Files: package.html Log Message: doc update --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for utilities. <h2>Package Specification</h2> This package contains usefull classes and interfaces used by code in project. </body> </html> Index: State.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/utils/State.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** State.java 8 Oct 2005 13:09:47 -0000 1.3 --- State.java 18 Oct 2005 17:45:56 -0000 1.4 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.4 2005/10/18 17:45:56 mstsxfx + * doc update + * * Revision 1.3 2005/10/08 13:09:47 mstsxfx * new interfaces *************** *** 83,87 **** * <li>state equals with o state. * </ul> ! * @pram o Object to examine. * @return true if o is same as this object, false otherwise. */ --- 86,90 ---- * <li>state equals with o state. * </ul> ! * @param o Object to examine. * @return true if o is same as this object, false otherwise. */ |
From: Michal H. <ms...@us...> - 2005-10-18 17:45:15
|
Update of /cvsroot/exfex/exfex/source/exfex/common/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11418/source/exfex/common/plugins Added Files: package.html Log Message: package info --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Basic package for common plugins. <h2>Package Specification</h2> This package contains (or should contain) all plugins. When new plugin is created it should be deployed here. All subsystems have its subpackage to keep order in big amount of plugins. <br> If plugin is used for remote purposes it should be deployed in remote subpackage which has similar hierarchy as this package (subpackages for subsystems). </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-18 17:44:10
|
Update of /cvsroot/exfex/exfex/source/exfex/common/logging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11143/source/exfex/common/logging Modified Files: Logger.java Added Files: package.html Log Message: doc update --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Basic package for information logging. <h2>Package Specification</h2> This package contains all classes and interfaces for logging. This includes low level logging device interface, higher level loger interface and implementation, logging manager that keeps all registered loggers. </body> </html> Index: Logger.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/logging/Logger.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Logger.java 29 Sep 2005 17:30:39 -0000 1.10 --- Logger.java 18 Oct 2005 17:43:56 -0000 1.11 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.11 2005/10/18 17:43:56 mstsxfx + * doc update + * * Revision 1.10 2005/09/29 17:30:39 mstsxfx * code cleanup *************** *** 310,314 **** return; ! log(ILogger.Level.DEBUG,"Logger.setTimeDisplay Time format changed to \"timeformat\""); displayTime=formater; }//}}} --- 313,317 ---- return; ! log(ILogger.Level.DEBUG,"Logger.setTimeDisplay Time format changed to \""+timeformat+"\""); displayTime=formater; }//}}} |
From: Michal H. <ms...@us...> - 2005-10-18 17:43:53
|
Update of /cvsroot/exfex/exfex/source/exfex/common/logging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11066/source/exfex/common/logging Modified Files: LogManager.java Log Message: unlock in finally block Index: LogManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/logging/LogManager.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LogManager.java 29 Sep 2005 17:31:38 -0000 1.9 --- LogManager.java 18 Oct 2005 17:43:41 -0000 1.10 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.10 2005/10/18 17:43:41 mstsxfx + * unlock in finally block + * * Revision 1.9 2005/09/29 17:31:38 mstsxfx * code cleanup *************** *** 29,35 **** package exfex.common.logging; ! import java.io.*; ! import java.util.*; ! import java.util.concurrent.locks.*; import java.util.concurrent.locks.ReentrantReadWriteLock; --- 32,42 ---- package exfex.common.logging; ! import java.io.DataOutputStream; ! import java.io.File; ! import java.io.FileNotFoundException; ! import java.io.FileOutputStream; ! import java.io.OutputStream; ! import java.util.Hashtable; ! import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantReadWriteLock; *************** *** 156,160 **** /* ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.loadFromSettings Loading from SettingManager"); // Gets Setting manager. --- 163,167 ---- /* ! log(ILogger.Level.DEBUG,"LogManager.loadFromSettings Loading from SettingManager"); // Gets Setting manager. *************** *** 162,166 **** if(smng==null) { ! getLogger("STANDARD_LOG").log(ILogger.Level.CRIT,"LogManager expected to SettingManager be initialized."); // TODO handle this error --- 169,173 ---- if(smng==null) { ! log(ILogger.Level.CRIT,"LogManager expected to SettingManager be initialized."); // TODO handle this error *************** *** 178,182 **** if (logFiles==null) { ! getLogger("STANDARD_LOG").log(ILogger.Level.Notice,"LogManager.loadFromSettings No logging files defined"); return; } --- 185,189 ---- if (logFiles==null) { ! log(ILogger.Level.Notice,"LogManager.loadFromSettings No logging files defined"); return; } *************** *** 191,195 **** } ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.loadFromSettings Loading from SettingManager finished"); */ }//}}} --- 198,202 ---- } ! log(ILogger.Level.DEBUG,"LogManager.loadFromSettings Loading from SettingManager finished"); */ }//}}} *************** *** 264,275 **** wLock.lock(); ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Registering new file destination name=\""+dest.getName()+"\" target=\""+dest.getTarget()+"\""); // If there is such destination registered, ignore without error if (loggerMap.get(dest.getName())!=null) { ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Alreaady registered name=\""+dest.getName()+"\""); ! ! wLock.unlock(); return; } --- 271,281 ---- wLock.lock(); ! ! log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Registering new file destination name=\""+dest.getName()+"\" target=\""+dest.getTarget()+"\""); // If there is such destination registered, ignore without error if (loggerMap.get(dest.getName())!=null) { ! log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Alreaady registered name=\""+dest.getName()+"\""); return; } *************** *** 288,292 **** }catch(Exception e) { ! getLogger("STANDARD_LOG").log(ILogger.Level.ERROR,"Can't resolve canonical name of "+dest.getTarget()+" reason="+e.getMessage()); return; } --- 294,298 ---- }catch(Exception e) { ! log(ILogger.Level.ERROR,"Can't resolve canonical name of "+dest.getTarget()+" reason="+e.getMessage()); return; } *************** *** 298,302 **** { // Shared logger stream ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Using shared logger device "+stream); }else { --- 304,308 ---- { // Shared logger stream ! log(ILogger.Level.DEBUG,"LogManager.registerFileDestination Using shared logger device "+stream); }else { *************** *** 309,320 **** stream=new LoggerStream(new DataOutputStream(out)); descriptorMap.put(abspath,stream); ! getLogger("STANDARD_LOG").log(ILogger.Level.DEBUG,"LogManager.registerFileDestination descriptorMap.put("+abspath+", "+stream+")"); }catch(Exception e) { ! getLogger("STANDARD_LOG").log(ILogger.Level.ERROR,"Can't create stream for "+dest.getTarget()+" reason="+e.getMessage()); ! ! wLock.unlock(); - return; } --- 315,323 ---- stream=new LoggerStream(new DataOutputStream(out)); descriptorMap.put(abspath,stream); ! log(ILogger.Level.DEBUG,"LogManager.registerFileDestination descriptorMap.put("+abspath+", "+stream+")"); }catch(Exception e) { ! log(ILogger.Level.ERROR,"Can't create stream for "+dest.getTarget()+" reason="+e.getMessage()); wLock.unlock(); return; } *************** *** 342,346 **** ILogger logger=new Logger(level,stream,prefix,timeformat); ! getLogger("STANDARD_LOG").log(ILogger.Level.INFO,"Registering logger "+logger+" prefix="+prefix+" level="+level); // Inserts (target,logger) pair to the table --- 345,349 ---- ILogger logger=new Logger(level,stream,prefix,timeformat); ! log(ILogger.Level.INFO,"Registering logger "+logger+" prefix="+prefix+" level="+level); // Inserts (target,logger) pair to the table *************** *** 362,370 **** wLock.lock(); ! ILogger logger=getLogger(dest.getName()); ! // Flushes output ! logger.flush(); ! wLock.unlock(); }//}}} --- 365,378 ---- wLock.lock(); ! try ! { ! ILogger logger=getLogger(dest.getName()); ! // Flushes output ! logger.flush(); ! }finally ! { ! wLock.unlock(); ! } }//}}} *************** *** 382,391 **** { rLock.lock(); ! ILogger result=loggerMap.get(name); ! if(result==null) ! result=NullLogger.getInstance(); ! rLock.unlock(); return result; }//}}} } --- 390,415 ---- { rLock.lock(); ! ILogger result=null; ! try ! { ! result=loggerMap.get(name); ! if(result==null) ! result=NullLogger.getInstance(); ! }finally ! { ! rLock.unlock(); ! } ! return result; }//}}} + /** Helper method for logging. + * + * @param level Message priority. + * @param msg Text to log. + */ + protected void log(ILogger.Level level, String msg) + { + getLogger("STANDARD_LOG").log(level,msg); + } } |
From: Michal H. <ms...@us...> - 2005-10-18 17:42:10
|
Update of /cvsroot/exfex/exfex/source/exfex/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10780/source/exfex/common Added Files: package.html Removed Files: readme Log Message: package info --- readme DELETED --- --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for common stuff for all parts of projekt. <h2>Package Specification</h2> This package contains all common subsystems separated to subpackages. Each bigger subsystem has own subpackage. See subpackages info for more information. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-17 19:59:28
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/displaysystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10072/source/exfex/common/remote/displaysystem Modified Files: IRemoteSessionManager.java Log Message: doc update Index: IRemoteSessionManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/remote/displaysystem/IRemoteSessionManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IRemoteSessionManager.java 14 Oct 2005 17:57:42 -0000 1.1 --- IRemoteSessionManager.java 17 Oct 2005 19:59:15 -0000 1.2 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.2 2005/10/17 19:59:15 mstsxfx + * doc update + * * Revision 1.1 2005/10/14 17:57:42 mstsxfx * remote interface for SessionManager *************** *** 22,26 **** /** Session Manager remote interface. ! * * * <pre> --- 25,32 ---- /** Session Manager remote interface. ! * This interface is inteded for remote (client) use. Each method has ! * {@link exfex.common.remote.security.IRemoteIdentity} parameter to be able to ! * check caller permisions to the operation. If caller (defined by its id) is ! * not allowed to perform operation PluginSecurityException is thrown. * * <pre> |
From: Michal H. <ms...@us...> - 2005-10-17 19:57:57
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9713/source/exfex/common/remote/pluginsystem Added Files: package.html Log Message: package describtion --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> Package for Remote plugin system service. <h2>Package Specification</h2> This package contains all classes and interfaces for remote plugin system view. <br> Defines remote interface for plugin manager and its implementation which should be used as stup implementation. Before using rmic command should be used to create RMI stub. </body> </html> |
From: Michal H. <ms...@us...> - 2005-10-17 19:54:44
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8999/source/exfex/common/remote/pluginsystem Modified Files: IRemotePluginManager.java Log Message: local PluginManager view separated from remote view Index: IRemotePluginManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem/IRemotePluginManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IRemotePluginManager.java 14 Oct 2005 18:01:07 -0000 1.2 --- IRemotePluginManager.java 17 Oct 2005 19:54:31 -0000 1.3 *************** *** 3,6 **** --- 3,9 ---- * * $Log$ + * Revision 1.3 2005/10/17 19:54:31 mstsxfx + * local PluginManager view separated from remote view + * * Revision 1.2 2005/10/14 18:01:07 mstsxfx * doc update *************** *** 75,78 **** --- 78,121 ---- throws RemoteException, PluginSecurityException; + /** Returns plugins by interface. + * + * All plugins registered on PluginManager are considered. This method + * should be just security wraper for + * {@link exfex.common.pluginsystem.IAcceptPlugin#getByIface(Class)} + * method and performs id authorization checks. Security mechanism + * should guarantee that only remote services should be returned + * (those which extends Remote interface). + * @param id Identity of the caller. + * @param plgType Type of the plugin. + * @return List of all plugins compatible with given type. + * @throws PluginException If no plugin with given type is registered + * on PluginManager. + * @throws RemoteException If problem during RMI call occures. + * @throws PluginSecurityException if unauthorized id requieres this + * operation. + */ + public List<IPlugin> getByIface(IRemoteIdentity id, Class<?> plgType) + throws PluginException, RemoteException, PluginSecurityException; + + /** Returns plugin by interface and name. + * + * All plugins registered on PluginManager are considered. This method + * should be just security wraper for + * {@link exfex.common.pluginsystem.IAcceptPlugin#getByName(Class, String)} + * method and performs id authorization checks. Security mechanism + * should guarantee that only remote servic should be returned + * (those which extends Remote interface). + * @param id Identity of the caller. + * @param plgType Type of the plugin. + * @param name Name of the plugin. + * @return Plugin with given name and type. + * @throws PluginException If no given plugin doesn't exist. + * @throws RemoteException If problem during RMI call occures. + * @throws PluginSecurityException if unauthorized id requieres this + * operation. + */ + public IPlugin getByName(IRemoteIdentity id, Class<?> plgType, String name) + throws PluginException, RemoteException, PluginSecurityException; + /** Schedules plugin for loading. * |
From: Michal H. <ms...@us...> - 2005-10-17 19:53:52
|
Update of /cvsroot/exfex/exfex/source/exfex/common/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8854/source/exfex/common/pluginsystem Modified Files: PluginManager.java Log Message: code consolidation, documentation update Index: PluginManager.java =================================================================== RCS file: /cvsroot/exfex/exfex/source/exfex/common/pluginsystem/PluginManager.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PluginManager.java 13 Oct 2005 18:32:47 -0000 1.19 --- PluginManager.java 17 Oct 2005 19:53:43 -0000 1.20 *************** *** 6,9 **** --- 6,12 ---- * * $Log$ + * Revision 1.20 2005/10/17 19:53:43 mstsxfx + * code consolidation, documentation update + * * Revision 1.19 2005/10/13 18:32:47 mstsxfx * exceptions caused by lowlevel exceptions uses constructor with cause parameter *************** *** 64,68 **** --- 67,73 ---- package exfex.common.pluginsystem; + import java.io.Serializable; import java.lang.reflect.Field; + import java.util.HashMap; import java.util.LinkedList; import java.util.List; *************** *** 80,85 **** * * <h3>Overview</h3> ! * Object that controls and manages plugin system. Primary function of this ! * class is to: * <ul> * <li> --- 85,92 ---- * * <h3>Overview</h3> ! * Object that controls and manages plugin system. It should be wraped by ! * IRemotePluginManager implementator to produce RMI service. ! * <br> ! * Primary function and responsibilities of this class is to: * <ul> * <li> *************** *** 107,111 **** * <b>purge plugin</b> - get rid of plugin from readyList and unregisters * plugin from system. This can triger recursive purging of all depended ! * plugins. * <li> * <b>keep dependency relations</b> - keeps map of dependencies. For --- 114,118 ---- * <b>purge plugin</b> - get rid of plugin from readyList and unregisters * plugin from system. This can triger recursive purging of all depended ! * plugins. Use remove method to perform purgin. * <li> * <b>keep dependency relations</b> - keeps map of dependencies. For *************** *** 117,126 **** * * <h3>Usage</h3> ! * This Class is intended to be singleton, so there is no public constructor and ! * instance of the class can be obtained by static getInstance method. * <br> ! * To manage plugins use schedule, load and purge methods. If you are not sure ! * about plugin and don't want to load it directly you can use loadTest method, ! * which will load module on copy of actual state of manager. * <br> * Note that manager is very strict and if process of loading causes exception --- 124,135 ---- * * <h3>Usage</h3> ! * PluginManager conforms singleton design pattern, so there is no public ! * constructor and instance of the class can be obtained by static getInstance ! * method. * <br> ! * To manage plugins use <code>uploadFile</code>, <code>schedule</code>, ! * <code>load</code> and <code>remove</code> methods. If you are not sure about ! * plugin and don't want to load it directly you can use <code>loadTest</code> ! * method, which will load module on copy of actual state of manager. * <br> * Note that manager is very strict and if process of loading causes exception *************** *** 134,144 **** * <br> * Anytime you need to choose one plugin from pugin list with respect to the ! * strategy, use static strategySelect method. This method solves logic of ! * strategy select, so if any changes comes, you don't have to reimplement your ! * code. ! * Similarily, if you want to find out if plugin conformes given strategy, use ! * static conformStrategy method. * If you want to find out all dependencies of any type, you can call ! * getDependencies static method. * <br> * This class extends AcceptPlugin which means that: --- 143,151 ---- * <br> * Anytime you need to choose one plugin from pugin list with respect to the ! * strategy, use static <code>strategySelect</code> method. This method solves ! * logic of strategy select, so if any changes comes, you don't have to ! * reimplement your code. * If you want to find out all dependencies of any type, you can call ! * <code>getDependencies</code> static method. * <br> * This class extends AcceptPlugin which means that: *************** *** 156,165 **** * TODO use settings manager - loadFromSetting method * TODO autoEraseProblematic - field to control if plugins that produces ! * exceptions are automaticaly removed from resolvingList ! * TODO create remote interface. * ! * Changes: ! * 13.10.2005 msts - All thrown exceptions caused by other exceptions sets * cause in constructors. * 24.9.2005 msts - new schedule method, load method changed, dependency map * contains just not isolated relations. --- 163,172 ---- * TODO use settings manager - loadFromSetting method * TODO autoEraseProblematic - field to control if plugins that produces ! * exceptions are automaticaly removed from resolvingList * ! * Changes: ! * 14.10.2005 msts - All thrown exceptions caused by other exceptions sets * cause in constructors. + * New remove method. * 24.9.2005 msts - new schedule method, load method changed, dependency map * contains just not isolated relations. *************** *** 185,190 **** * @author msts */ ! public class PluginManager extends AcceptPlugin implements CloneAble { /** Logger symbolic name. * --- 192,200 ---- * @author msts */ ! public class PluginManager extends AcceptPlugin ! implements CloneAble, Serializable { + static private final long serialVersionUID = 1L; + /** Logger symbolic name. * *************** *** 233,236 **** --- 243,249 ---- * PluginManager is singleton, so instance is stored in * the static field. This initialize all needed stuff. + * + * TODO setting from SettingManager + * (CLASS_DIR - root of all classes) */ private PluginManager() *************** *** 241,251 **** depMap=new DependencyMap(); depMap.setLogName(logName); } /** Initialization constructor for cloning purposes. * ! * Sets fields' values (uses shallow copy of given parameters). If ! * caller wants to created deep copy of other plugin manager he ! * has to give deep copies of paramters. * * @param depMap Depenedency map instance. --- 254,268 ---- depMap=new DependencyMap(); depMap.setLogName(logName); + + // doesn't have to set logger to the supertype, because + // we override its log method. } /** Initialization constructor for cloning purposes. * ! * Calls supertype constructor with acceptPluginMap and ! * acceptPluginLogger parameters and Sets fields' values (uses shallow ! * copy of given parameters). If caller wants to created deep copy of ! * other plugin manager he has to give deep copies of paramters. * * @param depMap Depenedency map instance. *************** *** 254,260 **** * @param resolvingList Resolving list instance. * @param logName Log name string. */ ! protected PluginManager(DependencyMap depMap, PluginList depList, PluginList readyList, PluginList resolvingList, String logName) { this.depMap=depMap; this.depList=depList; --- 271,288 ---- * @param resolvingList Resolving list instance. * @param logName Log name string. + * @param acceptPluginMap Deep copy of AcceptPlugin registered plugin + * map to be used in AcceptPlugin constructor. + * @param acceptPluginLogger Logger of AcceptPlugin super type to be + * used in AcceptPlugin constructor. */ ! protected PluginManager(DependencyMap depMap, ! PluginList depList, ! PluginList readyList, ! PluginList resolvingList, ! String logName, ! HashMap<PluginType, PluginList> acceptPluginMap, ! ILogger acceptPluginLogger) { + super(acceptPluginMap, acceptPluginLogger); this.depMap=depMap; this.depList=depList; *************** *** 413,478 **** //================ - /** Factory method for this class. - * - * @return Instance of PluginManager. - */ - public static PluginManager getInstance() - { - return instance; - } - - /** Try to to load plugin. - * - * Creates clone of plugin manager and try to solve dependencies for - * given plugin. - * <p> - * NOTE: This method takes no effect on original plugin manager. - * - * @param plugin plugin to load. - * @return true if plugin can be immediately, false otherwise. - */ - synchronized public boolean loadTest(String plugin) - { - // creates temporary manager and try to load plugin. - // if no exception is thrown, everything is ok - // otherwise problem is logged - PluginManager temp=(PluginManager)this.clone(); - - boolean result; - try - { - IPlugin plg=fetch(plugin); - result=temp.solveDependencies(plg); - }catch(Throwable e) - { - return false; - } - // returnes result of load - return result; - } - - /** Returns all registered (ready to use) plugins. - * - * Changes to this list takes no effect to the manager's list. - * @return List of ready plugins. - */ - synchronized public List<IPlugin> readyPlugins()//{{{ - { - return readyList.toList(); - }//}}} - - /** Returns all plugins waiting for dependencies. - * - * Returns copy of depList. Changes to this list takes no effect to - * manager's list. - * - * @see PluginManager#depList - * @return List of not registered plugins. - */ - synchronized public List<IPlugin> pendingPlugins()//{{{ - { - return depList.toList(); - }//}}} - /** Schedules plugin for loading. * --- 441,444 ---- *************** *** 491,499 **** * * @see #fetch(String) ! * @see #depList * @param plugnames Plugins to schedule. * @throws PluginLoadException if fetch method failes. */ ! synchronized public void schedule(String[] plugnames)throws PluginLoadException { // it's not an error, to get null list, it means that nothing --- 457,466 ---- * * @see #fetch(String) ! * @see #depList * @param plugnames Plugins to schedule. * @throws PluginLoadException if fetch method failes. */ ! synchronized public void schedule(String[] plugnames) ! throws PluginLoadException { // it's not an error, to get null list, it means that nothing *************** *** 501,505 **** if(plugnames==null) return; ! for(String name : plugnames) { --- 468,472 ---- if(plugnames==null) return; ! for(String name : plugnames) { *************** *** 510,513 **** --- 477,511 ---- } + /** Try to to load plugin. + * + * Creates clone of plugin manager and try to solve dependencies for + * given plugin. + * <p> + * NOTE: This method takes no effect on original plugin manager. + * + * @param plugin plugin to load. + * @return true if plugin can be immediately, false otherwise. + * + */ + synchronized public boolean loadTest(String plugin) + { + // creates temporary manager and try to load plugin. + // if no exception is thrown, everything is ok + // otherwise problem is logged + PluginManager temp=(PluginManager)this.clone(); + + boolean result; + try + { + IPlugin plg=fetch(plugin); + result=temp.solveDependencies(plg); + }catch(Throwable e) + { + return false; + } + // returnes result of load + return result; + } + /** Load schedulled plugins. * *************** *** 540,544 **** * <h3>Exception handling</h3> * If critical error occures during dependency solving, ! * solveDependencies method throws PluginException exception. It is * propageted up until this method. Manager will handle this situation * that way that it will restore its state (all internals changed during --- 538,542 ---- * <h3>Exception handling</h3> * If critical error occures during dependency solving, ! * solveDependencies method throws PluginLoadException exception. It is * propageted up until this method. Manager will handle this situation * that way that it will restore its state (all internals changed during *************** *** 555,559 **** * */ ! public synchronized void load()throws PluginLoadException //{{{ { if(depList.size()==0) --- 553,558 ---- * */ ! public synchronized void load() ! throws PluginLoadException //{{{ { if(depList.size()==0) *************** *** 613,619 **** }//}}} ! ! /** Get plugin out of the system. * * Unregister plugin from system. * <p> --- 612,650 ---- }//}}} ! ! /** Factory method for this class. * + * @return Instance of PluginManager. + */ + public static PluginManager getInstance() + { + return instance; + } + + /** Returns all registered (ready to use) plugins. + * + * Changes to this list takes no effect to the manager's list. + * + * @return List of ready plugins. + */ + synchronized public List<IPlugin> readyPlugins() + { + return readyList.toList(); + } + + /** Returns all plugins waiting for dependencies. + * + * Returns copy of depList. Changes to this list takes no effect to + * manager's list. + * + * @return List of not registered plugins. + */ + synchronized public List<IPlugin> pendingPlugins()//{{{ + { + return depList.toList(); + }//}}} + + /** Removes plugin from the system. + * * Unregister plugin from system. * <p> *************** *** 629,633 **** * <li>removes plugin from dependency source from dependency map * using DependencyMap.releaseSource. If method returns not null, ! * it will recursively call purge to all plugins in list. * <li>removes plugin from dependency lists in dependency map * using DependencyMap.releaseDependency method. --- 660,664 ---- * <li>removes plugin from dependency source from dependency map * using DependencyMap.releaseSource. If method returns not null, ! * it will recursively call remove to all plugins in list. * <li>removes plugin from dependency lists in dependency map * using DependencyMap.releaseDependency method. *************** *** 639,649 **** * </ul> * <li>Plugin is not found - error and exception throw ! * </ul> ! * ! * @param plugin Plugin to remove. * @throws PluginException If plugin error occures (see getMessage for * more info) */ ! public synchronized void purge(IPlugin plugin)throws PluginException//{{{ { log(ILogger.Level.NOTICE,"Purging plugin "+plugin); --- 670,679 ---- * </ul> * <li>Plugin is not found - error and exception throw ! * </ul> ! * @param plugin Plugin to remove * @throws PluginException If plugin error occures (see getMessage for * more info) */ ! public synchronized void remove(IPlugin plugin)throws PluginException { log(ILogger.Level.NOTICE,"Purging plugin "+plugin); *************** *** 666,676 **** // Plugin wasn't also in depList, this can happen when // there is cyclic dependency relation. ! log(ILogger.Level.ERROR,"PluginManager.purge Unable to find plugin "+plugin); throw new PluginException(new String("Unable to find plugin")); } if(depList.removePlugin(candidate)) ! log(ILogger.Level.DEBUG,"PluginManager.purge "+plugin+" removed from depList. depList size="+depList.size()); ! log(ILogger.Level.NOTICE,"Plugin "+plugin+" purged"); ! }//}}} /** Returns map of dependency map. --- 696,706 ---- // Plugin wasn't also in depList, this can happen when // there is cyclic dependency relation. ! log(ILogger.Level.ERROR,"PluginManager.remove Unable to find plugin "+plugin); throw new PluginException(new String("Unable to find plugin")); } if(depList.removePlugin(candidate)) ! log(ILogger.Level.DEBUG,"PluginManager.remove "+plugin+" removed from depList. depList size="+depList.size()); ! log(ILogger.Level.NOTICE,"Plugin "+plugin+" removed"); ! } /** Returns map of dependency map. *************** *** 708,712 **** depMap+"}"); } - /** Deep copy creator. --- 738,741 ---- *************** *** 714,724 **** * Creates new instance of PluginManager object with deep copy of this * object. ! * <p> ! * TODO: what with AcceptPlugin class * @return Instance of PluginManager object. */ @Override public synchronized Object clone() { ! return new PluginManager((DependencyMap)depMap.clone(), (PluginList)depList.clone(), (PluginList)readyList.clone(), (PluginList)resolvingList.clone(), new String(logName)); } --- 743,759 ---- * Creates new instance of PluginManager object with deep copy of this * object. ! * * @return Instance of PluginManager object. */ @Override public synchronized Object clone() { ! ! return new PluginManager((DependencyMap)depMap.clone(), ! (PluginList)depList.clone(), ! (PluginList)readyList.clone(), ! (PluginList)resolvingList.clone(), ! new String(logName), ! super.getMap(), ! super.logger); } *************** *** 1087,1091 **** * the checksum * <br> ! * TODO uses some configuration for restrictions on plugins * * @param name Name of plugin. --- 1122,1126 ---- * the checksum * <br> ! * TODO use some configuration for restrictions on plugins * * @param name Name of plugin. *************** *** 1234,1238 **** * dependencies, restores saved state and returns false. * <li>if returns true - dependencies solved for newone and so it ! * can replace oldone. Starts with {@link exfex.common.pluginsystem.DependencyMap#consolidateDependencies(IPlugin, IPlugin) consolidating dependency map} * which means, removing oldone referencie (those which stood from * resolving process - e.g. newone has different dependencies or --- 1269,1274 ---- * dependencies, restores saved state and returns false. * <li>if returns true - dependencies solved for newone and so it ! * can replace oldone. Starts with ! * {@link DependencyMap#consolidateDependencies(IPlugin, IPlugin)} * which means, removing oldone referencie (those which stood from * resolving process - e.g. newone has different dependencies or *************** *** 1659,1666 **** * @param message Message to log. */ ! protected void log(ILogger.Level level,String message) { LogManager.getInstance().getLogger(logName).log(level,message); } - } --- 1695,1701 ---- * @param message Message to log. */ ! @Override protected void log(ILogger.Level level,String message) { LogManager.getInstance().getLogger(logName).log(level,message); } } |
From: Michal H. <ms...@us...> - 2005-10-17 19:48:05
|
Update of /cvsroot/exfex/exfex/source/exfex/common/remote/pluginsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7212/source/exfex/common/remote/pluginsystem Added Files: RemotePluginManager.java Log Message: remote view of the PluginManager --- NEW FILE: RemotePluginManager.java --- /* * $RCSfile: RemotePluginManager.java,v $ * * $Log: RemotePluginManager.java,v $ * Revision 1.1 2005/10/17 19:47:55 mstsxfx * remote view of the PluginManager * */ package exfex.common.remote.pluginsystem; import java.io.File; import java.io.IOException; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.util.List; import exfex.common.pluginsystem.IPlugin; import exfex.common.pluginsystem.PluginException; import exfex.common.pluginsystem.PluginLoadException; import exfex.common.pluginsystem.PluginManager; import exfex.common.pluginsystem.PluginSecurityException; import exfex.common.remote.security.IRemoteIdentity; /** Remote view of the PluginManager. * * This class is adapter for PluginManager and it creates secure service to * controll plugin system. Each method accepts identity parameter to perform * security checking for authorization of given identity for operation. If * identity is authorized, delegates operation to the local PluginManager. * <br> * Extends UnicastRemoteObject to behave as RMI object (it can be used as remote * object using RMI mechanism). This Manager should be registered by Naming * service to be accessible. * <pre> * // example how to export manager as service * IRemotePluginManager manager=new RemotePluginManager(); * * // bind manager instance with the server_name host on port as PluginManager * // service. Using Naming.lookup can be found there. * Naming.rebind("rmi://{server_name}{:port}/PluginManager", manager); * </pre> * * <p> * <pre> * Changes: * 17.10.2005 msts - created * </pre> * * @author cz2p10d4 */ public class RemotePluginManager extends UnicastRemoteObject implements IRemotePluginManager { private static final long serialVersionUID = 1L; /** Delagated PluginManager. */ private PluginManager manager=PluginManager.getInstance(); /** Initializing constructor. * * Calls supertype constructor without parameters. * @throws RemoteException If UnicastRemoteObject constructors fails. */ public RemotePluginManager()throws RemoteException { super(); } /** Returns all registered (ready to use) plugins. * * TODO id and security layer. * * Calls {@link exfex.common.pluginsystem.PluginManager#readyPlugins()} * method after security checks. * <br> * Changes to this list takes no effect to the manager's list. * * @param id Identity of the caller caller. * @return List of ready plugins. * @throws RemoteException If problem during RMI call occures. * @throws PluginSecurityException if unauthorized id requieres this * operation. */ synchronized public List<IPlugin> readyPlugins(IRemoteIdentity id) throws RemoteException,PluginSecurityException//{{{ { // FIXME id integrity and authorization check return manager.readyPlugins(); }//}}} /** Returns all plugins waiting for dependencies. * * TODO id and security layer. * Returns copy of depList (list of schedulled plugins). Changes to this * list takes no effect to manager's list. * * @param id Identity of the caller. * @return List of not registered plugins. * @throws RemoteException If problem during RMI call occures. * @throws PluginSecurityException if unauthorized id requieres this * operation. */ synchronized public List<IPlugin> pendingPlugins(IRemoteIdentity id) throws RemoteException,PluginSecurityException//{{{ { // FIXME id integrity and authorization check return manager.pendingPlugins(); }//}}} /** Uploads plugin to the hierarchy. * TODO */ public void uploadFile(IRemoteIdentity id, File file, String location) throws RemoteException, IOException { // FIXME id integrity and authorization check // TODO implement } /** Schedules plugin for loading. * * TODO id and security layer. * * Calls {@link PluginManager#schedule(String[])} method for rest of the * job. * * @param id Identity of the caller. * @param plugnames Plugins to schedule. * @throws PluginLoadException if fetch method failes. * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. */ synchronized public void schedule(IRemoteIdentity id, String[] plugnames) throws PluginLoadException, PluginSecurityException, RemoteException { // it's not an error, to get null list, it means that nothing // should be done if(plugnames==null) return; // FIXME id check manager.schedule(plugnames); } /** Try to to load plugin. * * TODO id and security layer. * * Calls {@link PluginManager#loadTest(String)} method for rest of the * job. * * @param id Identity of the caller. * @param plugin plugin to load. * @return true if plugin can be immediately, false otherwise. * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. */ synchronized public boolean loadTest(IRemoteIdentity id, String plugin) throws PluginSecurityException, RemoteException { // FIXME id check return manager.loadTest(plugin); } /** Load schedulled plugins. * * TODO id and security layer. * * Calls {@link PluginManager#load()} method for rest of the job. * * @see PluginManager#solveDependencies * @param id Identity of the caller. * @throws PluginLoadException if critical error occures during plugin * dependencies resolving. * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. * */ public synchronized void load(IRemoteIdentity id) throws PluginLoadException, PluginSecurityException, RemoteException //{{{ { // FIXME id check manager.load(); }//}}} /** Get plugin out of the system. * * TODO id and security layer. * * Delegates all work to the {@link #remove(IPlugin)} method. * * @param id Identity of the caller. * @param plugin Plugin to remove. * @throws PluginException If plugin error occures (see getMessage for * more info) * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. */ public synchronized void purge(IRemoteIdentity id, IPlugin plugin) throws PluginException, PluginSecurityException, RemoteException//{{{ { // FIXME id check manager.remove(plugin); }//}}} /** Retuns all plugins registered in the PluginManager compatible with * given type. * * TODO id and security layer. Enables just plugins that are type * compatible with Remote interface to gurantee just remote services * as return value. * * Delegates all work to the * {@link exfex.common.pluginsystem.IAcceptPlugin#getByIface(Class)} * method. * * @param id Identity of the caller. * @param plgType * @throws PluginException If plugin error occures (see getMessage for * more info) * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. */ public List<IPlugin> getByIface(IRemoteIdentity id, Class<?> plgType) throws PluginException, RemoteException, PluginSecurityException { // FIXME security return manager.getByIface(plgType).toList(); } /** Retuns plugin regitered in the PluginManager with the given name and * type. * * TODO id and security layer. Enables just plugin that is type * compatible with Remote interface to gurantee just remote services * as return value. * * Delegates all work to the * {@link exfex.common.pluginsystem.IAcceptPlugin#getByName(Class, String)} * method. * * @param id Identity of the caller. * @param plgType Plugin type. * @param name Plugin name. * @throws PluginException If plugin error occures (see getMessage for * more info) * @throws PluginSecurityException if given identity is not authorized * to perform operation. * @throws RemoteException if RMI error occures during operation. */ public IPlugin getByName(IRemoteIdentity id, Class<?> plgType, String name) throws PluginException, RemoteException, PluginSecurityException { // FIXME security return manager.getByName(plgType, name); } } |