|
||||||||||
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
cs290b.project.computer.ComputerImpl
public class ComputerImpl
The implementation of the Computer interface.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
ComputerImpl()
The default constructor for exporting the remote object. |
|
ComputerImpl(Computer2Server server,
java.lang.String computerName)
Constructor used to create the computer impl object. |
Method Summary | |
---|---|
void |
exitService()
Administrable implementation to stop the Computer abruptly. |
int |
getComputerId()
|
java.lang.String |
getComputerName()
|
java.lang.String |
getKnownServers()
|
java.lang.String |
getServerHostName()
|
Shared |
getShared()
Get the shared object. |
static void |
main(java.lang.String[] args)
|
void |
registerListener(RemoteListener listener)
Register a listener with this computer. |
void |
run()
|
void |
sendEvent(java.lang.Object event)
Does nothing. |
void |
setComputation(java.lang.Object input)
Computer implementation to share common input from the client. |
void |
setShared(Shared newShared)
Set the shared object if newer. |
void |
stopService()
Administrable implementation to stop the remote object and all executing threads gracefully. |
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 |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComputerImpl() throws java.rmi.RemoteException
java.rmi.RemoteException
public ComputerImpl(Computer2Server server, java.lang.String computerName) throws java.rmi.RemoteException
server
- Remote reference to the server.
java.rmi.RemoteException
Method Detail |
---|
public java.lang.String getServerHostName()
public java.lang.String getKnownServers()
public int getComputerId()
public java.lang.String getComputerName()
public void stopService()
stopService
in interface Administrable
public void exitService()
exitService
in interface Administrable
public void setComputation(java.lang.Object input) throws java.rmi.RemoteException
setComputation
in interface Computer
input
- The input for the tasks.
java.rmi.RemoteException
public void setShared(Shared newShared)
setShared
in interface Computer
setShared
in interface SupportManager
newShared
- The possible new value of shared.public Shared getShared()
getShared
in interface SupportManager
public void registerListener(RemoteListener listener)
registerListener
in interface Computer
registerListener
in interface SupportManager
listener
- The listener to register.public void sendEvent(java.lang.Object event)
sendEvent
in interface SupportManager
event
- The event to send (ignored).public void run()
run
in interface java.lang.Runnable
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |