fulmine.distribution.connection
Interface IConnectionDiscoverer

All Superinterfaces:
IDestroyable, IHeartbeatMonitor, ILifeCycle
All Known Implementing Classes:
AbstractConnectionDiscoverer, TcpConnectionDiscoverer

public interface IConnectionDiscoverer
extends ILifeCycle, IHeartbeatMonitor

Discovers other remote IFrameworkContext instances that have connected to the communication network. When a new remote context is discovered, this raises a ContextDiscoveredEvent event.

All discoverer instances periodically send out a 'pulse' onto the network. This period is determined from IHeartbeatMonitor.getNetworkHeartbeatPeriod(). This pulse is the mechanism for initial discovery and continual verification that a remote context is still available. When a discoverer misses a set number of pulses from a remote context, it raises a ContextNotAvailableEvent.

Author:
Ramon Servadei
See Also:
IHeartbeatMonitor.getAllowableNetworkHeartbeatMissCount()

Field Summary
 
Fields inherited from interface fulmine.distribution.IHeartbeatMonitor
DEFAULT_ALLOWED_MISSED_COUNT, DEFAULT_HEARTBEAT_PERIOD
 
Method Summary
 void connectionDestroyed(String remoteContextIdentity)
          Informs the discoverer that a connection to the named remote context has been destroyed.
 void disablePulsing()
          Disable the discoverer from sending out pulses.
 void enablePulsing()
          Enable the discoverer to send out pulses.
 void pulse()
          Send out a pulse on the discovery network.
 void start()
          Start discovering other remote IFrameworkContext instances
 
Methods inherited from interface fulmine.ILifeCycle
isActive
 
Methods inherited from interface fulmine.IDestroyable
destroy
 
Methods inherited from interface fulmine.distribution.IHeartbeatMonitor
getAllowableNetworkHeartbeatMissCount, getNetworkHeartbeatPeriod, setAllowableNetworkHeartbeatMissCount, setNetworkHeartbeatPeriod
 

Method Detail

start

void start()
Start discovering other remote IFrameworkContext instances

Specified by:
start in interface ILifeCycle

pulse

void pulse()
Send out a pulse on the discovery network. This allows other IConnectionDiscoverer instances on the same network to detect this one.


disablePulsing

void disablePulsing()
Disable the discoverer from sending out pulses. The discoverer will still detect other IConnectionDiscoverer instances from their pulses, it just will not send out any pulses for itself; effectively it is in listening-only mode.


enablePulsing

void enablePulsing()
Enable the discoverer to send out pulses. By default, calling start() sets the discoverer in this mode unless disablePulsing() is called before start().


connectionDestroyed

void connectionDestroyed(String remoteContextIdentity)
Informs the discoverer that a connection to the named remote context has been destroyed. The discoverer should remove any information regarding this context and be prepared to re-discover it.

Parameters:
remoteContextIdentity - the remote context that has had a connection destroyed


Copyright © 2007-2009. All Rights Reserved.