| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
tools.rmiserver.JinniRmiImpl
public class JinniRmiImpl
This is the implementation of the IJinniEngine for the JinnIde server. This is a kind of RMI wrapper redirecting the calls to embedded IJinniEngine - either a JinniPrologEngine or a JinniPureEngine.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface tools.jinnide.IJinniEngine | 
|---|
IJinniEngine.EngineState | 
| Field Summary | |
|---|---|
 java.lang.String | 
defaultPortNr
 | 
| Constructor Summary | |
|---|---|
JinniRmiImpl()
 | 
|
| Method Summary | |
|---|---|
 java.lang.String | 
consult(java.lang.String filePath)
consults a file  | 
 java.lang.String | 
getInitializationFile()
find out the name of the initialization file used to start up the Jinni engine  | 
 java.lang.String | 
getJinniOutput()
this one is implemented by all the specialization classes because it includes getting the output (but not the direct feedback)  | 
 java.lang.String | 
getLibraryPath()
find out the path of the current Jinni engine's system library  | 
 JinniEngineAnswer | 
getQuery(java.lang.String validator,
         java.lang.String value)
asks a question to Jinni and returns a Jinni solution, which is only the first solution in foreground mode returned as a JinniEngineAnswer so focussed on true/false validation  | 
 JinniEngineAnswer | 
getSimpleQuery(java.lang.String validator,
               java.lang.String value)
asks a question to Jinni and returns a Jinni solution, which is only the first solution in foreground mode returned as a JinniEngineAnswer so focussed on true/false validation  | 
 java.lang.String | 
getStartupFeedback()
Returns and sets engine feedback as a by result of a query, usually the first consulting query to load the lib  | 
 IJinniEngine.EngineState | 
getState()
Informs the client of this engine's state  | 
 java.lang.String | 
getVersion()
 | 
 void | 
halt()
this is one of a couple of reset methods for the Jinni server process (only halt affects the RMI server process ) such as reset which does an internal reset of the Jinni engine, should be used with care  | 
 boolean | 
isAllModeUsed()
find out if the all mode is active  | 
 boolean | 
isBackgroundModeUsed()
find out if the background mode is active  | 
 boolean | 
isPrologModeUsed()
find out if the prolog mode is active  | 
 boolean | 
isTraceModeUsed()
find out if the usual prolog trace mode is active  | 
 java.lang.String | 
jinnidoc(java.lang.String directoryPath)
generates a documentation for a whole directory  | 
 java.lang.String | 
jinnidoc(java.lang.String filePath,
         java.lang.String filename)
generates a documentation for a file  | 
 void | 
kill()
kill this server process by force despite pending client requests  | 
 java.lang.String | 
listing()
lists the current clauses in the current Jinni engine instance  | 
 java.lang.String | 
loadEngine()
loads the engine with classpaths, consults etc.; is implicitly done in startupEngine  | 
 java.lang.String | 
more()
returns the next solution if available otherwise no  | 
 JinniEngineAnswer | 
moreAsAnswer()
returns the next solution as a JinniEngineAnswer if available otherwise no  | 
static void | 
output(java.lang.String message)
 | 
 java.lang.String | 
query(java.lang.String query)
asks a question to Jinni and returns a Jinni solution, which is either all solutions in case of using the all mode, or otherwise just the first solution  | 
 java.lang.String | 
reconsult(java.lang.String filePath)
reconsult a file  | 
 java.lang.String | 
renew(java.lang.String objectName)
renew a Jinni object  | 
 java.lang.String | 
renewLoq4Jinni()
renews Loq4Jinni's state to update to another logging level which is set otherwise  | 
 java.lang.String | 
reset()
does an internal restart of the current Jinni engine  | 
 java.lang.String | 
restart()
restarts the Jinni server process without affecting the RMI server process  | 
 void | 
setAllMode(boolean isAllModeUsed)
allows switching between the usual prolog solution by solution mode and getting all solutions at once which is when isAllModeUsed must be true  | 
 void | 
setBackgroundMode()
allows switching on and off the background mode which allows running a query on the server in a separate thread while other queries may be answered in sort-of the same time while the other query is still running; There is no server-side usage because a JinniProlog server is actually a rather different alternative with its own advantages (and drwabacks ;), thus it would not implement this method (actually we could move this declaration to an abstract method somewhere below this interface).  | 
 void | 
setInitializationFile(java.lang.String filename)
sets the name of the file that is supposed to lie in the library set by setLibraryPath, if not set "init.pro" is assumed  | 
 void | 
setJinniOutput(javax.swing.JTextArea jta)
sets the text area that is used to insert all the output that is not the direct feedback of a query; if this method is not called, a default JTextArea is used  | 
 void | 
setLibraryPath(java.lang.String path)
set developer library path where on the first level an initialization file resides that is consulted by loadEngine which is all loadEngine actually does; if not set, the directory relative to this class library is assumed  | 
 void | 
setPrologMode(boolean isPrologModeUsed)
choose between a prolog mode which is the JinniPrologEngine and the pure mode which is the JinniPureEngine  | 
 void | 
setStartupFeedback(java.lang.String feedback)
 | 
 void | 
setTraceMode(boolean isTraceModeUsed)
allows switching on the usual prolog trace mode  | 
 java.lang.String | 
startupEngine()
starts up the default engine (without providing setup parameters)  | 
 java.lang.String | 
startupEngine(java.lang.String[] params)
starts up the engine  | 
 java.lang.String | 
stopEngine()
stops the engine and thus sets the system back to its initial state including a possibly running thread that is also stopped  | 
 java.lang.String | 
stopThread()
this one is implemented by all the specialization classes because it includes stopping the specific machine  | 
 void | 
terminate()
kill this server process gently  | 
| Methods inherited from class java.rmi.server.UnicastRemoteObject | 
|---|
clone, exportObject, exportObject, exportObject, unexportObject | 
| Methods inherited from class java.rmi.server.RemoteServer | 
|---|
getClientHost, getLog, setLog | 
| Methods inherited from class java.rmi.server.RemoteObject | 
|---|
equals, getRef, hashCode, toString, toStub | 
| Methods inherited from class java.lang.Object | 
|---|
getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public java.lang.String defaultPortNr
| Constructor Detail | 
|---|
public JinniRmiImpl()
             throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail | 
|---|
public java.lang.String getStartupFeedback()
                                    throws java.rmi.RemoteException,
                                           JinniEngineException
IJinniEngine
getStartupFeedback in interface IJinniEnginejava.rmi.RemoteException
JinniEngineExceptionpublic static void output(java.lang.String message)
public java.lang.String getVersion()
                            throws java.rmi.RemoteException
getVersion in interface IJinniEnginejava.rmi.RemoteException
public void kill()
          throws java.rmi.RemoteException,
                 java.rmi.NotBoundException,
                 java.rmi.NoSuchObjectException,
                 JinniEngineException,
                 java.net.MalformedURLException,
                 java.rmi.NotBoundException
kill in interface IJinniEnginejava.rmi.NotBoundException
java.net.MalformedURLException
JinnIdeGeneralExecutorException
java.rmi.RemoteException
java.rmi.NoSuchObjectException
JinniEngineException
public void terminate()
               throws java.rmi.RemoteException,
                      java.rmi.NoSuchObjectException,
                      JinniEngineException,
                      java.net.MalformedURLException,
                      java.rmi.NotBoundException
terminate in interface IJinniEnginejava.rmi.NotBoundException
java.net.MalformedURLException
java.rmi.RemoteException
java.rmi.NoSuchObjectException
JinniEngineException
public java.lang.String consult(java.lang.String filePath)
                         throws java.rmi.RemoteException,
                                JinniEngineException
IJinniEngine
consult in interface IJinniEnginefilePath - path to the file/directory to be consulted
JinniEngineException
java.rmi.RemoteException
public java.lang.String getInitializationFile()
                                       throws java.rmi.RemoteException
IJinniEngine
getInitializationFile in interface IJinniEnginejava.rmi.RemoteException
public java.lang.String getLibraryPath()
                                throws java.rmi.RemoteException
IJinniEngine
getLibraryPath in interface IJinniEnginejava.rmi.RemoteException
public void halt()
          throws JinniEngineException,
                 java.net.MalformedURLException,
                 java.rmi.NotBoundException
IJinniEngine
halt in interface IJinniEngineJinniEngineException
java.net.MalformedURLException
java.rmi.NotBoundException
public boolean isAllModeUsed()
                      throws java.rmi.RemoteException
IJinniEngine
isAllModeUsed in interface IJinniEnginejava.rmi.RemoteException
public boolean isPrologModeUsed()
                         throws JinniEngineException,
                                java.rmi.RemoteException
IJinniEngine
isPrologModeUsed in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public boolean isBackgroundModeUsed()
                             throws java.rmi.RemoteException
IJinniEngine
isBackgroundModeUsed in interface IJinniEnginejava.rmi.RemoteException
public boolean isTraceModeUsed()
                        throws java.rmi.RemoteException
IJinniEngine
isTraceModeUsed in interface IJinniEnginejava.rmi.RemoteException
public java.lang.String jinnidoc(java.lang.String filePath,
                                 java.lang.String filename)
                          throws java.rmi.RemoteException,
                                 JinniEngineException
IJinniEngine
jinnidoc in interface IJinniEnginefilePath - path to the file to be documentedfilename - name of the file to be documented
JinniEngineException
java.rmi.RemoteException
public java.lang.String jinnidoc(java.lang.String directoryPath)
                          throws java.rmi.RemoteException,
                                 JinniEngineException
IJinniEngine
jinnidoc in interface IJinniEnginedirectoryPath - path to the directory to be documented
JinniEngineException
java.rmi.RemoteException
public java.lang.String listing()
                         throws java.rmi.RemoteException,
                                JinniEngineException
IJinniEngine
listing in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String loadEngine()
                            throws java.rmi.RemoteException,
                                   JinniEngineException
IJinniEngine
loadEngine in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String more()
                      throws java.rmi.RemoteException,
                             JinniEngineException
IJinniEngine
more in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String query(java.lang.String query)
                       throws java.rmi.RemoteException,
                              JinniEngineException
IJinniEngine
query in interface IJinniEnginequery - the query to be asked
JinniEngineException
java.rmi.RemoteException
public java.lang.String reconsult(java.lang.String filePath)
                           throws java.rmi.RemoteException,
                                  JinniEngineException
IJinniEngine
reconsult in interface IJinniEnginefilePath - path to the file/directory to be reconsulted
JinniEngineException
java.rmi.RemoteException
public java.lang.String renew(java.lang.String objectName)
                       throws java.rmi.RemoteException,
                              JinniEngineException
IJinniEngine
renew in interface IJinniEngineobjectName - name of the object to be renewed
JinniEngineException
java.rmi.RemoteException
public java.lang.String renewLoq4Jinni()
                                throws java.rmi.RemoteException,
                                       JinniEngineException
IJinniEngine
renewLoq4Jinni in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String reset()
                       throws java.rmi.RemoteException,
                              JinniEngineException
IJinniEngine
reset in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String restart()
                         throws java.rmi.RemoteException,
                                JinniEngineException
IJinniEngine
restart in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public void setAllMode(boolean isAllModeUsed)
                throws java.rmi.RemoteException
IJinniEngine
setAllMode in interface IJinniEngineisAllModeUsed - actual switch value to be set
java.rmi.RemoteException
public void setBackgroundMode()
                       throws java.rmi.RemoteException,
                              JinniEngineException
IJinniEngine
setBackgroundMode in interface IJinniEnginejava.rmi.RemoteException
JinniEngineException
public void setInitializationFile(java.lang.String filename)
                           throws java.rmi.RemoteException,
                                  JinniEngineException
IJinniEngine
setInitializationFile in interface IJinniEnginefilename - name of the initialization file
JinniEngineException
java.rmi.RemoteException
public void setLibraryPath(java.lang.String path)
                    throws java.rmi.RemoteException,
                           JinniEngineException
IJinniEngine
setLibraryPath in interface IJinniEnginepath - path to the JinnIde sytem library
JinniEngineException
java.rmi.RemoteException
public void setPrologMode(boolean isPrologModeUsed)
                   throws java.rmi.RemoteException,
                          JinniEngineException
IJinniEngine
setPrologMode in interface IJinniEngineisPrologModeUsed - actual switch value to be set
java.rmi.RemoteException
JinniEngineException
public void setTraceMode(boolean isTraceModeUsed)
                  throws java.rmi.RemoteException,
                         JinniEngineException
IJinniEngine
setTraceMode in interface IJinniEngineisTraceModeUsed - actual switch value to be set
java.rmi.RemoteException
JinniEngineException
public java.lang.String startupEngine(java.lang.String[] params)
                               throws java.rmi.RemoteException,
                                      JinniEngineException
IJinniEngine
startupEngine in interface IJinniEngineparams - Jinni initialization parameters that may be set here
JinniEngineException
java.rmi.RemoteException
public java.lang.String stopEngine()
                            throws java.rmi.RemoteException,
                                   JinniEngineException
IJinniEngine
stopEngine in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String stopThread()
                            throws java.rmi.RemoteException,
                                   JinniEngineException
IJinniEngine
stopThread in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String getJinniOutput()
                                throws java.rmi.RemoteException,
                                       JinniEngineException
IJinniEngine
getJinniOutput in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public void setJinniOutput(javax.swing.JTextArea jta)
                    throws JinniEngineException
IJinniEngine
setJinniOutput in interface IJinniEnginejta - the text area to be used to keep the output of a Jinni instance
JinniEngineException
public JinniEngineAnswer getSimpleQuery(java.lang.String validator,
                                        java.lang.String value)
                                 throws JinniEngineException,
                                        java.rmi.RemoteException
IJinniEngine
getSimpleQuery in interface IJinniEnginevalidator - the validator to be used which is an indication of the desired
 validation predicate e.g. "validate" or "askItSomething"value - the value to be validated e.g. a number (passed as a String)
JinniEngineException
java.rmi.RemoteException
public JinniEngineAnswer getQuery(java.lang.String validator,
                                  java.lang.String value)
                           throws JinniEngineException,
                                  java.rmi.RemoteException
IJinniEngine
getQuery in interface IJinniEnginevalidator - the validator to be used which is an indication of the validation module and the
 desired validation predicate e.g. "validator:validate" or "validator:askMeSomething"; its syntax is idential
 with Jinni's module predicate call syntax so always uses a colon to separate the module from the 
 predicatevalue - the value to be validated
JinniEngineException
java.rmi.RemoteException
public JinniEngineAnswer moreAsAnswer()
                               throws JinniEngineException,
                                      java.rmi.RemoteException
IJinniEngine
moreAsAnswer in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String startupEngine()
                               throws JinniEngineException,
                                      java.rmi.RemoteException
IJinniEngine
startupEngine in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public IJinniEngine.EngineState getState()
                                  throws java.rmi.RemoteException
IJinniEngine
getState in interface IJinniEnginejava.rmi.RemoteException
public void setStartupFeedback(java.lang.String feedback)
                        throws java.rmi.RemoteException,
                               JinniEngineException
setStartupFeedback in interface IJinniEnginejava.rmi.RemoteException
JinniEngineException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||