Inheritance diagram for Server:
Private Methods | |
public | Server (String objectName) throws MPSException |
public | Server (String objectName, int portNumber) throws MPSException |
public | Server (String objectName, InetAddress address, int portNumber) throws MPSException |
public String | getBoundName () |
private void | setup (String objectName, InetAddress address, int portNumber) throws MPSException |
private void | setup () throws MPSException |
public boolean | getMultiThreaded () |
public void | setMultiThreaded (boolean m) |
public void | dispatch (int index, InputStream in, OutputStream out) throws MPSException |
public void | registerMethod (int index, String name, Thunk thunk) |
public void | run () |
Private Attributes | |
private String | objectName |
private String | boundName |
private ServerSocket | serverSocket |
private InetAddress | address |
private int | portNumber |
private boolean | multiThreaded = true |
private Vector | methodTable = new Vector() |
Static Private Methods | |
protected void | registerServer (Object key, Server svr) |
public Server | serverFor (Object key) |
Static Private Attributes | |
private Hashtable | allServers = new Hashtable() |
Pass in your desired objectName and an implementation of the correct interface to the automatically-generated subclasses of this class. It will spawn a thread that listens for connections to the server object.
Note that the implementation object is managed by subclasses of this class, and that this class knows nothing about the implementation of the MPS interface at all.
Definition at line 58 of file Server.java.
|
Create a new server named objectName. Bind to INADDR_ANY, on any unused port number.
Definition at line 126 of file Server.java. |
|
Create a new server named objectName. Bind to INADDR_ANY, on the passed-in port number.
Definition at line 138 of file Server.java. |
|
Create a new server named objectName. Bind to a specific interface, on the passed-in port number.
Definition at line 153 of file Server.java. |
|
Dispatches to a method on this MPS interface server.
Definition at line 243 of file Server.java. Referenced by Server::Runnable::run(). |
|
Return the canonical name of this server.
Definition at line 164 of file Server.java. Referenced by OutputStream::writeReference(). |
|
Returns true if this server is running multithreaded.
Definition at line 217 of file Server.java. Referenced by Server::Runnable::run(). |
|
Register a method-handler with the server.
Definition at line 262 of file Server.java. |
|
Registers an instance of Server against the MPSIDL interface object that it is serving. The MPSIDL compiler emits calls to this method when compiling MPSIDL specifications down to java skeletons.
Definition at line 76 of file Server.java. |
|
The main body of the server thread.
Definition at line 271 of file Server.java. |
|
Retrieve the Server associated with a particular MPSIDL interface instance.
Definition at line 87 of file Server.java. |
|
Determines whether multiple threads (one thread per client connection, remember) may access methods on the implementation object simultaneously.
If not, all dispatches to the implementation object go through a
Definition at line 230 of file Server.java. |
|
Creates and starts the thread, once all the instance variables have been set up.
Definition at line 191 of file Server.java. |
|
Performs all the steps needed to get the server started.
Definition at line 176 of file Server.java. |
|
Address of the interface our server socket is bound to.
Definition at line 101 of file Server.java. |
|
Map used to associate an MPSIDL interface instance with an instance of class Server.
Definition at line 65 of file Server.java. |
|
Machine-readable address of this object.
Definition at line 96 of file Server.java. |
|
Look-up-table mapping method number to method implementation.
Definition at line 118 of file Server.java. |
|
Set to true if we are to serve access to our implementation object in a multithreaded way; set to false to serialize all accesses.
Definition at line 111 of file Server.java. |
|
Human-readable name for this object.
Definition at line 94 of file Server.java. |
|
TCP Port number we're listening on.
Definition at line 103 of file Server.java. |
|
Server socket that clients connect to us on.
Definition at line 99 of file Server.java. |