time_constraint.time
Class Time
java.lang.Object
|
+--uka.karmi.rmi.server.RemoteObject
|
+--uka.karmi.rmi.server.UnicastRemoteObject
|
+--time_constraint.time.Time
- All Implemented Interfaces:
- java.lang.Cloneable, interface_time, uka.karmi.rmi.Remote
- public class Time
- extends uka.karmi.rmi.server.UnicastRemoteObject
- implements interface_time
The Time
class rapresents the time. Each istance represents the global time
and is used to simulate how the time runs away.
- Since:
- Version 1.2
- Version:
- 1.0
- Author:
- Daniela Olivieri
Fields inherited from class uka.karmi.rmi.server.RemoteObject |
serverRef |
Constructor Summary |
Time()
Creates and initializes a new Time object. |
Method Summary |
static void |
main(java.lang.String[] args)
Establishes which is its security server and which security policy it has
to respect; rebinds the name to the new time object. |
int |
updatetime()
Increases the time adding 1. |
Methods inherited from class uka.karmi.rmi.server.UnicastRemoteObject |
buildStub, clone, exportObject, exportObject, unexportObject |
Methods inherited from class uka.karmi.rmi.server.RemoteObject |
equals, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
, finalize, getClass, notify, notifyAll, wait, wait, wait |
Time
public Time()
throws uka.karmi.rmi.RemoteException
- Creates and initializes a new Time object.
- Throws:
uka.karmi.rmi.RemoteException
- - Since:
- Version 1.0
updatetime
public int updatetime()
- Increases the time adding 1. Returns the new time.
- Specified by:
updatetime
in interface interface_time
- Since:
- Version 1.0
main
public static void main(java.lang.String[] args)
- Establishes which is its security server and which security policy it has
to respect; rebinds the name to the new time object.
- Since:
- Version 1.0