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
Method Summary |
boolean |
allowsCreateUsers()
|
protected void |
bindName()
|
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)
|
protected void |
extractMetaProjectLocation(String s)
|
Collection<String> |
getAvailableProjectNames(RemoteSession session)
|
static String |
getBoundName()
|
Collection |
getCurrentSessions(RemoteServerProject project)
|
Collection |
getCurrentSessions(String projectName,
RemoteSession session)
|
static Server |
getInstance()
|
protected static String |
getLocalBoundName()
|
KnowledgeBase |
getMetaProject()
|
Slot |
getNameSlot()
|
static Policy |
getPolicy()
|
Project |
getProject(String name)
|
Cls |
getProjectCls()
|
ServerProject |
getServerProject(Project p)
|
ServerProject |
getServerProject(String projectName)
|
boolean |
isActive(RemoteSession session)
|
static void |
main(String[] args)
|
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 |
shutdown()
|
static void |
startServer(String[] args)
Calls startServer with ServerRmiSocketFactory as the socket factory. |
static void |
startServer(String[] args,
RMISocketFactory sf)
Start up the server. |
String |
toString()
|
main
public static void main(String[] args)
startServer
public static void startServer(String[] args)
throws IOException
- Calls startServer with
ServerRmiSocketFactory
as the socket factory.
- Throws:
IOException
startServer
public static void startServer(String[] args,
RMISocketFactory sf)
throws IOException
- Start up the server.
- Parameters:
args
- the arguments to the serversf
- 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()
reinitialize
public void reinitialize()
throws RemoteException
- Specified by:
reinitialize
in interface RemoteServer
- Throws:
RemoteException
bindName
protected void bindName()
throws RemoteException
- 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
isActive
public boolean isActive(RemoteSession session)
openProject
public RemoteServerProject openProject(String projectName,
RemoteSession session)
throws ServerSessionLost
- Specified by:
openProject
in interface RemoteServer
- Throws:
ServerSessionLost
getServerProject
public ServerProject getServerProject(String projectName)
disconnectFromProject
public void disconnectFromProject(RemoteServerProject serverProject,
RemoteSession session)
throws ServerSessionLost
- Throws:
ServerSessionLost
getServerProject
public ServerProject getServerProject(Project p)
getProject
public Project getProject(String name)
createProject
public RemoteServerProject createProject(String newProjectName,
RemoteSession session,
KnowledgeBaseFactory kbfactory,
boolean saveToMetaProject)
throws RemoteException
- Specified by:
createProject
in interface RemoteServer
- Throws:
RemoteException
getAvailableProjectNames
public Collection<String> getAvailableProjectNames(RemoteSession session)
- Specified by:
getAvailableProjectNames
in interface RemoteServer
getCurrentSessions
public Collection getCurrentSessions(String projectName,
RemoteSession session)
- Specified by:
getCurrentSessions
in interface RemoteServer
getCurrentSessions
public Collection getCurrentSessions(RemoteServerProject project)
allowsCreateUsers
public boolean allowsCreateUsers()
throws RemoteException
- Specified by:
allowsCreateUsers
in interface RemoteServer
- Throws:
RemoteException
createUser
public boolean createUser(String userName,
String password)
- Specified by:
createUser
in interface RemoteServer
toString
public String toString()
- Overrides:
toString
in class RemoteObject
shutdown
public void shutdown()
- Specified by:
shutdown
in interface RemoteServer
setFrameCalculatorDisabled
public void setFrameCalculatorDisabled(boolean disabled)
getMetaProject
public KnowledgeBase getMetaProject()
getProjectCls
public Cls getProjectCls()
getNameSlot
public Slot getNameSlot()
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2007 Stanford University.