public interface ShellServer extends Remote
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAllAvailableCommands() |
String |
getName() |
Response |
interpretLine(Serializable clientID,
String line,
Output out)
Receives a command line (probably from a
ShellClient) and reacts
to it. |
Serializable |
interpretVariable(Serializable clientID,
String key)
Interprets a variable from a client session and returns the
interpreted result.
|
void |
leave(Serializable clientID)
Notifies this server that the client identified by
clientID is about to
leave, so any session associated with it will be removed. |
void |
makeRemotelyAvailable(int port,
String name)
Makes this server available at
localhost for clients to connect to via RMI. |
void |
makeRemotelyAvailable(String host,
int port,
String name)
Makes this server available at the specific
host for clients to connect to via RMI. |
void |
setSessionVariable(Serializable clientID,
String key,
Object value)
Sets a session property for the session identified by
clientID. |
void |
shutdown()
Shuts down the server.
|
TabCompletion |
tabComplete(Serializable clientID,
String partOfLine)
Tries to complete a half-entered line and returns possible candidates,
in the form of a
TabCompletion. |
void |
terminate(Serializable clientID)
Marks the client's active transaction as terminated.
|
Welcome |
welcome(Map<String,Serializable> initialSession) |
String getName() throws RemoteException
RemoteException - RMI error.Response interpretLine(Serializable clientID, String line, Output out) throws ShellException, RemoteException
ShellClient) and reacts
to it. Output is written to the Output object.clientID - identifying the client.line - the command line to react to.out - where output should go (like System.out).ShellException - if there was an error in the
interpretation/execution of the command line.RemoteException - RMI error.Serializable interpretVariable(Serializable clientID, String key) throws ShellException, RemoteException
clientID - identifying the client.key - the variable key.
help the interpretation.ShellException - if some error should occur.RemoteException - RMI error.void terminate(Serializable clientID) throws RemoteException
clientID - identifying the client.RemoteException - RMI error.Welcome welcome(Map<String,Serializable> initialSession) throws RemoteException, ShellException
initialSession - the initial session variables that the client would
like to override or add to any initial server session variables.RemoteException - RMI error.ShellException - wraps general errorsvoid leave(Serializable clientID) throws RemoteException
clientID is about to
leave, so any session associated with it will be removed.clientID - the ID which identifies the client which is leaving.
These IDs are handed out from welcome(Map).RemoteException - RMI error.void shutdown()
throws RemoteException
RemoteException - RMI error.void makeRemotelyAvailable(int port,
String name)
throws RemoteException
localhost for clients to connect to via RMI.port - the RMI port.name - the RMI name.RemoteException - RMI error.void makeRemotelyAvailable(String host, int port, String name) throws RemoteException
host for clients to connect to via RMI.host - the host to make this server available at.port - the RMI port.name - the RMI name.RemoteException - RMI error.String[] getAllAvailableCommands() throws RemoteException
RemoteException - RMI error.TabCompletion tabComplete(Serializable clientID, String partOfLine) throws ShellException, RemoteException
TabCompletion.clientID - identifying the client.partOfLine - the half-entered line to try to complete.TabCompletion containing the possible candidates for completion.ShellException - if some error should occur.RemoteException - RMI error.void setSessionVariable(Serializable clientID, String key, Object value) throws RemoteException, ShellException
clientID.clientID - the client ID to identify the session.key - the property key.value - the property value.RemoteException - RMI error.ShellException - if an error occurs during initialization.Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.