Package jadex.platform.service.awareness
Class IntraVMAwarenessAgent
- java.lang.Object
- 
- jadex.platform.service.awareness.IntraVMAwarenessAgent
 
- 
- All Implemented Interfaces:
- IAwarenessService
 
 public class IntraVMAwarenessAgent extends java.lang.Object implements IAwarenessService Implements passive awareness via shared memory.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected static java.util.concurrent.locks.ReadWriteLockdisclockRead-write lock for discoveries map.protected static java.util.Map<IComponentIdentifier,IntraVMAwarenessAgent>discoveriesThe started discovery agents.
 - 
Constructor SummaryConstructors Constructor Description IntraVMAwarenessAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.util.List<TransportAddress>>getPlatformAddresses(IComponentIdentifier platformid)Gets the address for a platform ID using the awareness mechanism.IIntermediateFuture<IComponentIdentifier>searchPlatforms()Try to find other platforms and finish after timeout.voidshutdown()At shutdown remove platform from list.voidstart()At startup add platform to list.
 
- 
- 
- 
Field Detail- 
disclockprotected static final java.util.concurrent.locks.ReadWriteLock disclock Read-write lock for discoveries map.
 - 
discoveriesprotected static final java.util.Map<IComponentIdentifier,IntraVMAwarenessAgent> discoveries The started discovery agents.
 - 
agentprotected IInternalAccess agent The agent.
 
- 
 - 
Method Detail- 
startpublic void start() throws java.lang.ExceptionAt startup add platform to list.- Throws:
- java.lang.Exception
 
 - 
shutdownpublic void shutdown() throws java.lang.ExceptionAt shutdown remove platform from list.- Throws:
- java.lang.Exception
 
 - 
getPlatformAddressespublic IFuture<java.util.List<TransportAddress>> getPlatformAddresses(IComponentIdentifier platformid) Gets the address for a platform ID using the awareness mechanism.- Specified by:
- getPlatformAddressesin interface- IAwarenessService
- Parameters:
- platformid- The platform ID.
- Returns:
- The transport addresses or null if not available.
 
 - 
searchPlatformspublic IIntermediateFuture<IComponentIdentifier> searchPlatforms() Try to find other platforms and finish after timeout. Immediately returns known platforms and concurrently issues a new search, waiting for replies until the timeout.- Specified by:
- searchPlatformsin interface- IAwarenessService
 
 
- 
 
-