Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protege.server
Class Server

    java.lang.Object
      java.rmi.server.RemoteObject
          java.rmi.server.RemoteServer
              java.rmi.server.UnicastRemoteObject
                  edu.stanford.smi.protege.server.Server

All Implemented Interfaces:
  RemoteServer, Serializable, Remote

    public class Server

extends UnicastRemoteObject
implements RemoteServer

See Also:
  Serialized Form

Nested Class Summary
`static class` | `Server.ServerStatus`

Field Summary

Fields inherited from class java.rmi.server.RemoteObject
`ref`

Method Summary
`boolean` | `allowsCreateUsers()`
`protected void` | `bindName()`
`boolean` | `cancelShutdownProject(RemoteSession session, String projectName)`
`RemoteSession` | `cloneSession(RemoteSession session)`
`void` | `closeSession(RemoteSession session)`
`RemoteServerProject` | `createProject(String newProjectName, RemoteSession session, KnowledgeBaseFactory kbfactory, boolean saveToMetaProject)`
`boolean` | `createUser(String userName, String password)`
`void` | `disconnectFromProject(RemoteServerProject serverProject, RemoteSession session)`
`Object` | `executeServerJob(ServerJob job, RemoteSession session)`
`protected void` | `extractMetaProjectLocation(String s)`
`Collection<String>` | `getAllProjectNames()`
`Collection<String>` | `getAvailableProjectNames(RemoteSession session)`
`static String` | `getBoundName()`
`Collection<ServerProject>` | `getCurrentProjects(RemoteSession session)`
`Collection<RemoteSession>` | `getCurrentSessions()`
`Collection<RemoteSession>` | `getCurrentSessions(RemoteServerProject project)`
`Collection<RemoteSession>` | `getCurrentSessions(String projectName, RemoteSession session)`
`static Server` | `getInstance()`
`protected static String` | `getLocalBoundName()`
`KnowledgeBase` | `getMetaProject()` Deprecated. In ProtegeJobs use getMetaProjectInstance
`MetaProject` | `getMetaProjectNew()`
`Slot` | `getNameSlot()` Deprecated. In ProtegeJobs use getMetaProjectInstance
`Project` | `getOrCreateProject(String name)`
`static Policy` | `getPolicy()`
`Project` | `getProject(String name)`
`Cls` | `getProjectCls()` Deprecated. In ProtegeJobs use getMetaProjectInstance
`Map<String,ServerProject.ProjectStatus>` | `getProjectsStatusMap()`
`ServerProject.ProjectStatus` | `getProjectStatus(String name)`
`ServerProject` | `getServerProject(Project p)`
`ServerProject` | `getServerProject(String projectName)`
`boolean` | `isActive(RemoteSession session)`
`boolean` | `isOperationAllowed(RemoteSession session, Operation op, String projectName)`
`boolean` | `isServerOperationAllowed(RemoteSession session, Operation op)`
`boolean` | `isServerOperationAllowed(RemoteSession session, Operation op, String serverName)`
`void` | `killOtherUserSession(RemoteSession sessionToKill, RemoteSession session)`
`void` | `killOtherUserSession(RemoteSession sessionToKill, RemoteSession session, int finalGracePeriod)`
`static void` | `main(String[] args)`
`void` | `notifyProject(String projectName, String message, RemoteSession session)`
`RemoteServerProject` | `openProject(String projectName, RemoteSession session)`
`RemoteSession` | `openSession(String username, String userIpAddress, String password)`
`protected void` | `parseArg(String arg)`
`protected void` | `printUsage()`
`void` | `reinitialize()`
`void` | `setFrameCalculatorDisabled(boolean disabled)`
`void` | `setProjectStatus(String name, ServerProject.ProjectStatus status)`
`void` | `setProjectStatus(String projectName, ServerProject.ProjectStatus status, RemoteSession session)`
`void` | `shutdown()`
`void` | `shutdown(String projectName, RemoteSession session)`
`void` | `shutdownProject(RemoteSession session, String projectName, float warningTimeInSeconds)` Shuts down the remote project with the name projectName and sends shutdown notifications at certain time periods: it starts with the warningTimeInSeconds argument and divides it by two.
`void` | `shutdownProject(RemoteSession session, String projectName, Integer[] warningTimesInSeconds, int finalGracePeriodInSeconds)` Shuts down the remote project with the name projectName and sends shutdown notifications at time periods (in seconds) from the warningTimesInSeconds argument.
`static void` | `startServer(String[] args)` Start up the server.
`String` | `toString()`

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, toStub`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### main

    public static void main(String[] args)

### startServer

    public static void startServer(String[] args)
                            throws IOException

  Start up the server.

  Parameters:
    `args` - the arguments to the server
    `sf` - the socket factory to be used
  Throws:
    `IOException` - if the socket factory has already been set
  See Also:
    `RMISocketFactory.setSocketFactory(RMISocketFactory)`

### getInstance

    public static Server getInstance()

### getPolicy

    public static Policy getPolicy()

### getBoundName

    public static String getBoundName()

### getLocalBoundName

    protected static String getLocalBoundName()

### parseArg

    protected void parseArg(String arg)

### extractMetaProjectLocation

    protected void extractMetaProjectLocation(String s)

### printUsage

    protected void printUsage()

### bindName

    protected void bindName()
                     throws RemoteException

  Throws:
    `RemoteException`

### getServerProject

    public ServerProject getServerProject(String projectName)

### getOrCreateProject

    public Project getOrCreateProject(String name)

### toString

    public String toString()

  Overrides:
    `toString` in class `RemoteObject`

### isActive

    public boolean isActive(RemoteSession session)

### disconnectFromProject

    public void disconnectFromProject(RemoteServerProject serverProject,
                                      RemoteSession session)
                               throws ServerSessionLost

  Throws:
    `ServerSessionLost`

### getProject

    public Project getProject(String name)

### getServerProject

    public ServerProject getServerProject(Project p)

### getProjectStatus

    public ServerProject.ProjectStatus getProjectStatus(String name)

  Specified by:
    `getProjectStatus` in interface `RemoteServer`

### setProjectStatus

    public void setProjectStatus(String name,
                                 ServerProject.ProjectStatus status)

### getCurrentProjects

    public Collection<ServerProject> getCurrentProjects(RemoteSession session)

### getCurrentSessions

    public Collection<RemoteSession> getCurrentSessions()

### getCurrentSessions

    public Collection<RemoteSession> getCurrentSessions(RemoteServerProject project)

### setFrameCalculatorDisabled

    public void setFrameCalculatorDisabled(boolean disabled)

### getMetaProjectNew

    public MetaProject getMetaProjectNew()

### getMetaProject

    @Deprecated
    public KnowledgeBase getMetaProject()

  Deprecated. In ProtegeJobs use getMetaProjectInstance

### getProjectCls

    @Deprecated
    public Cls getProjectCls()

  Deprecated. In ProtegeJobs use getMetaProjectInstance

### getNameSlot

    @Deprecated
    public Slot getNameSlot()

  Deprecated. In ProtegeJobs use getMetaProjectInstance

### reinitialize

    public void reinitialize()
                      throws RemoteException

  Specified by:
    `reinitialize` in interface `RemoteServer`
  Throws:
    `RemoteException`

### openSession

    public RemoteSession openSession(String username,
                                     String userIpAddress,
                                     String password)

  Specified by:
    `openSession` in interface `RemoteServer`

### cloneSession

    public RemoteSession cloneSession(RemoteSession session)

  Specified by:
    `cloneSession` in interface `RemoteServer`

### closeSession

    public void closeSession(RemoteSession session)

  Specified by:
    `closeSession` in interface `RemoteServer`

### getCurrentSessions

    public Collection<RemoteSession> getCurrentSessions(String projectName,
                                                        RemoteSession session)

  Specified by:
    `getCurrentSessions` in interface `RemoteServer`

### getAvailableProjectNames

    public Collection<String> getAvailableProjectNames(RemoteSession session)

  Specified by:
    `getAvailableProjectNames` in interface `RemoteServer`

### getAllProjectNames

    public Collection<String> getAllProjectNames()

### getProjectsStatusMap

    public Map<String,ServerProject.ProjectStatus> getProjectsStatusMap()

### openProject

    public RemoteServerProject openProject(String projectName,
                                           RemoteSession session)
                                    throws ServerSessionLost

  Specified by:
    `openProject` in interface `RemoteServer`
  Throws:
    `ServerSessionLost`

### createProject

    public RemoteServerProject createProject(String newProjectName,
                                             RemoteSession session,
                                             KnowledgeBaseFactory kbfactory,
                                             boolean saveToMetaProject)
                                      throws RemoteException

  Specified by:
    `createProject` in interface `RemoteServer`
  Throws:
    `RemoteException`

### setProjectStatus

    public void setProjectStatus(String projectName,
                                 ServerProject.ProjectStatus status,
                                 RemoteSession session)

  Specified by:
    `setProjectStatus` in interface `RemoteServer`

### notifyProject

    public void notifyProject(String projectName,
                              String message,
                              RemoteSession session)

  Specified by:
    `notifyProject` in interface `RemoteServer`

### createUser

    public boolean createUser(String userName,
                              String password)

  Specified by:
    `createUser` in interface `RemoteServer`

### shutdown

    public void shutdown()

  Specified by:
    `shutdown` in interface `RemoteServer`

### shutdown

    public void shutdown(String projectName,
                         RemoteSession session)

  Specified by:
    `shutdown` in interface `RemoteServer`

### killOtherUserSession

    public void killOtherUserSession(RemoteSession sessionToKill,
                                     RemoteSession session)

  Specified by:
    `killOtherUserSession` in interface `RemoteServer`

### killOtherUserSession

    public void killOtherUserSession(RemoteSession sessionToKill,
                                     RemoteSession session,
                                     int finalGracePeriod)

  Specified by:
    `killOtherUserSession` in interface `RemoteServer`

### shutdownProject

    public void shutdownProject(RemoteSession session,
                                String projectName,
                                float warningTimeInSeconds)
                         throws RemoteException

  Shuts down the remote project with the name projectName and sends shutdown notifications at certain time periods: it starts with the warningTimeInSeconds argument and divides it by two. A `SecurityException` is thrown if the user of the session does not have the right to shutdown the project.

  Specified by:
    `shutdownProject` in interface `RemoteServer`
  Parameters:
    `session` - - the session that tries to shutdown the project
    `projectName` - - the remote project name
    `warningTimeInSeconds` - - the time of the first notification in seconds
  Throws:
    `RemoteException`

### shutdownProject

    public void shutdownProject(RemoteSession session,
                                String projectName,
                                Integer[] warningTimesInSeconds,
                                int finalGracePeriodInSeconds)
                         throws RemoteException

  Shuts down the remote project with the name projectName and sends shutdown notifications at time periods (in seconds) from the warningTimesInSeconds argument. A `SecurityException` is thrown if the user of the session does not have the right to shutdown the project.

  Specified by:
    `shutdownProject` in interface `RemoteServer`
  Parameters:
    `session` - - the session that tries to shutdown the project
    `projectName` - - the remote project name
    `warningTimesInSeconds` - - a list of `Integer` with the notify periods of time in seconds
    `finalGracePeriodInSeconds` - - the time the server will wait until shutting down the project after the last notification message
  Throws:
    `RemoteException`

### cancelShutdownProject

    public boolean cancelShutdownProject(RemoteSession session,
                                         String projectName)

  Specified by:
    `cancelShutdownProject` in interface `RemoteServer`

### allowsCreateUsers

    public boolean allowsCreateUsers()
                              throws RemoteException

  Specified by:
    `allowsCreateUsers` in interface `RemoteServer`
  Throws:
    `RemoteException`

### isOperationAllowed

    public boolean isOperationAllowed(RemoteSession session,
                                      Operation op,
                                      String projectName)

  Specified by:
    `isOperationAllowed` in interface `RemoteServer`

### isServerOperationAllowed

    public boolean isServerOperationAllowed(RemoteSession session,
                                            Operation op)

  Specified by:
    `isServerOperationAllowed` in interface `RemoteServer`

### isServerOperationAllowed

    public boolean isServerOperationAllowed(RemoteSession session,
                                            Operation op,
                                            String serverName)

  Specified by:
    `isServerOperationAllowed` in interface `RemoteServer`

### executeServerJob

    public Object executeServerJob(ServerJob job,
                                   RemoteSession session)

  Specified by:
    `executeServerJob` in interface `RemoteServer`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2009 Stanford University.