fulmine.context
Interface INetwork

All Superinterfaces:
IHeartbeatMonitor
All Known Implementing Classes:
FTTcpNetwork, TcpNetwork

public interface INetwork
extends IHeartbeatMonitor

A network groups all the necessary components for connecting an IFulmineContext to a specific network transport. The network allows the context to communicate with other remote contexts that connect to the same network transport.

A single implementation instance will be used by only a single context instance.

Author:
Ramon Servadei

Field Summary
 
Fields inherited from interface fulmine.distribution.IHeartbeatMonitor
DEFAULT_ALLOWED_MISSED_COUNT, DEFAULT_HEARTBEAT_PERIOD
 
Method Summary
 IConnectionBroker createBroker()
          Create a connection broker.
 IChannel createChannel(IConnection connection)
          Create a channel
 IConnectionDiscoverer createDiscoverer()
          Create a connection discoverer.
 boolean isListeningOnlyMode()
          Get the value of the listening only mode
 void setContext(IFrameworkContext context)
          Set the context this network services
 void setListeningOnlyMode(boolean listeningOnlyMode)
          Sets the IConnectionDiscoverer returned from createDiscoverer() into listening-only mode.
 
Methods inherited from interface fulmine.distribution.IHeartbeatMonitor
getAllowableNetworkHeartbeatMissCount, getNetworkHeartbeatPeriod, setAllowableNetworkHeartbeatMissCount, setNetworkHeartbeatPeriod
 

Method Detail

setContext

void setContext(IFrameworkContext context)
Set the context this network services

Parameters:
context - the context this network services

createBroker

IConnectionBroker createBroker()
Create a connection broker.

Returns:
a connection broker

createDiscoverer

IConnectionDiscoverer createDiscoverer()
Create a connection discoverer.

Returns:
a connection discoverer

createChannel

IChannel createChannel(IConnection connection)
Create a channel

Parameters:
connection - the connection for the channel
Returns:
a new channel wrapping the connection

setListeningOnlyMode

void setListeningOnlyMode(boolean listeningOnlyMode)
Sets the IConnectionDiscoverer returned from createDiscoverer() into listening-only mode. This effectively means that the discoverer will not send out pulses but will monitor the pulses from other contexts.

Calling this after the discoverer is created and started will also cause the discoverer to go into listening-only mode.

Parameters:
listeningOnlyMode - true if the discoverer should be in listening only mode
See Also:
IConnectionDiscoverer.disablePulsing()

isListeningOnlyMode

boolean isListeningOnlyMode()
Get the value of the listening only mode

Returns:
true if the discoverer is in listening only mode


Copyright © 2007-2009. All Rights Reserved.