neosim.implementation
Class SourceMethodImpl
java.lang.Object
|
+--neosim.implementation.SourceMethodImpl
- public class SourceMethodImpl
- extends java.lang.Object
- implements SourceMethod
Connect from a specified output port to (potentially) all
entities in destination population.
This is the superclass for user source methods.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
srcPort
protected PortID srcPort
SourceMethodImpl
public SourceMethodImpl(PortID srcPort)
sendRequests
public void sendRequests(Entity srce,
Population destPop,
DestMethod dm)
- Description copied from interface: SourceMethod
- THIS METHOD SHOULD BE OVERRIDDEN BY DIFFERENT SOURCE METHODS.
The sendRequests method checks the source entity's details
and sends connection requests to individual destination
entities (using sendRequest) or to all members of a population
(using bcastRequest).
- Specified by:
- sendRequests in interface SourceMethod
- Tags copied from interface: SourceMethod
- Parameters:
srce
- the source entitydestPop
- the destination Populationdm
- the destination method to handle requests at the far end
sendRequest
public final void sendRequest(Entity srce,
EntityID deste,
ConnectionRequest cr)
- Description copied from interface: SourceMethod
- THIS METHOD CAN BE CALLED FROM WITHIN sendRequests() ABOVE.
The sendRequest method sends an individual connection request to
a destination entity
- Specified by:
- sendRequest in interface SourceMethod
- Tags copied from interface: SourceMethod
- Parameters:
srce
- the source entitydeste
- the handle of the destination entitycr
- the connection request
bcastRequest
public final void bcastRequest(Entity srce,
Population destPop,
ConnectionRequest cr)
- Description copied from interface: SourceMethod
- THIS METHOD CAN BE CALLED FROM WITHIN sendRequests() ABOVE.
The bcastRequest method sends an identical request to
all members of a destination population
- Specified by:
- bcastRequest in interface SourceMethod
- Tags copied from interface: SourceMethod
- Parameters:
srce
- the source entitydestpop
- the population to connect tocr
- the connection request