neosim.implementation
Class DestMethodImpl
java.lang.Object
|
+--neosim.implementation.DestMethodImpl
- public class DestMethodImpl
- extends java.lang.Object
- implements DestMethod
The part of a general projection which runs on
a destination entity and decides to fulfil/deny
connection requests.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DestMethodImpl
public DestMethodImpl(PortID destPort,
Time delay)
getDestPort
public PortID getDestPort()
getDelay
public Time getDelay()
considerRequest
public Connection considerRequest(Entity deste,
ConnectionRequest cr)
- The considerRequest method checks the source entity's details
against the dest entity's details, and returns True or False
depending on whether or not the connection will be made.
- Specified by:
- considerRequest in interface DestMethod
- Parameters:
deste
- the destination entitycr
- the connection request from the source entity- Returns:
- connection if a connection made, null otherwise.
makeConnection
public final ConnectionID makeConnection(Entity deste,
Connection c)
- This method is called by the considerRequest method to
create a connection.
- Specified by:
- makeConnection in interface DestMethod
- Parameters:
c
- the connection to make- Returns:
- the id of the connection