User Manual, Developers Guide and API Documentation

tcp::Service Class Reference

TCP service implementation. In FUN world the service implements the upperconvergence, connected to the flow separator FU.

#include <Service.hpp>

Inheritance diagram for tcp::Service:

Inheritance graph
[legend]
Collaboration diagram for tcp::Service:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addFlowSeparatorInstance (const wns::service::tl::FlowID &_flowID)
 Add new instance of flow separator's prototype according to flowID. This method is used by the lowerConvergence which is also responsible for creation of instances of the prototype.
virtual void closeConnection (wns::service::tl::Connection *_connection)
 Close an opened connection.
virtual void connectionClosed (const wns::service::tl::FlowID &_flowID)
virtual void connectionEstablished (const wns::service::tl::FlowID &_flowID)
 This method is called by the handshake strategy if a connection was established.
void deleteFlowSeparatorInstance (const wns::service::tl::FlowID &_flowID)
void dllFlowChanged (wns::service::tl::FlowID flowID, wns::service::dll::FlowID dllFlowID)
ConnectiongetConnection (const wns::service::tl::FlowID &_flowID)
 Return the corresponding connection to flow id.
HandshakeStrategyInterfacegetHandshakeStrategyFU (const wns::service::tl::FlowID &_flowID)
 Return HandshakeStrategy FU according to flowID.
wns::service::nl::ServicegetIPService ()
 Returns instance of underlying IP layer. Needed to get the node's ip address.
bool isListening (wns::service::tl::Port _port)
 Query wether a upper layer service is listening to a certain port.
virtual bool isValidFlow (const wns::ldk::ConstKeyPtr &_key) const
 The FlowInfoProvider interface.
virtual void listenOnPort (wns::service::tl::Port _port, wns::service::tl::ConnectionHandler *_ch)
 Open passive connection and listen for incoming connections.
virtual void openConnection (wns::service::tl::Port _port, wns::service::nl::FQDN _source, wns::service::nl::FQDN _peerAddress, wns::service::qos::QoSClass _qosClass, wns::service::tl::ConnectionHandler *_ch)
 OpenConnection method is divided into two methods, because of FlowHandling at DLL.
virtual void openConnectionContinue (wns::service::tl::FlowID flowID, wns::service::dll::FlowID dllFlowID=0)
virtual void passiveClosed (const wns::service::tl::FlowID &_flowID)
 This method is called by the TCP finite state machine to inform the application of a passively closed connection.
void passiveOpenConnection (const wns::service::tl::FlowID &_flowID)
 Open connection passively.
 Service (UpperConvergence *_upperConvergence, LowerConvergence *_lowerConvergence, wns::ldk::FlowSeparator *_flowSeparator, const wns::pyconfig::View &_pyco, tcp::FlowHandler *_tcpFlowHandler, wns::service::dll::FlowEstablishmentAndRelease *_fear, wns::ldk::ControlServiceRegistry *_csr)
void setDataTransmissionService (wns::service::nl::Service *service)
 The service from IP. Needed for DataTransmission.
void setDNSService (wns::service::nl::DNSService *service)
void setTcpFlowHandlerService (tcp::FlowHandler *service)
void stopListenOnPort (wns::service::tl::Port _port)
 Stop listening on Port.
virtual ~Service ()

Private Attributes

wns::service::nl::DNSServicedns
wns::service::dll::FlowEstablishmentAndReleaseflowEstablishmentAndRelease
wns::container::Registry
< wns::service::tl::FlowID,
wns::service::tl::ConnectionHandler
*, wns::container::registry::NoneOnErase
flowIDToConnectionHandler
 Mapping of flowID <--> connectionHandler.
wns::container::Registry
< wns::service::tl::FlowID,
Connection
*, wns::container::registry::NoneOnErase
flowIDToConnections
 Mapping of flow id to corresponding opened connection.
wns::ldk::FlowSeparatorflowSeparator
 The flow separator FU of TCP's FUN.
wns::service::nl::ServiceipService
 TL layer needs to know the IP address.
wns::container::Registry
< wns::service::tl::Port,
wns::service::tl::ConnectionHandler * > 
listeners
 Registration of ports a server is listening to.
wns::logger::Logger logger
 The TL service's logger.
LowerConvergencelowerConvergence
 The lower FU of TCP's FUN.
wns::service::tl::PortPool portPool
 The transport layer's port pool.
wns::pyconfig::View pyco
simTimeType removeDelay
 The delay between call to remove the flow separator's instance.
tcp::FlowHandlertcpFlowHandler
UpperConvergenceupperConvergence
 The upper FU of TCP's FUN.

Classes

class  RemoveFlowSeparatorInstance
 Callback event to delete instance of flow separator. More...


Detailed Description

Definition at line 61 of file Service.hpp.


Constructor & Destructor Documentation

Service::Service ( UpperConvergence _upperConvergence,
LowerConvergence _lowerConvergence,
wns::ldk::FlowSeparator _flowSeparator,
const wns::pyconfig::View _pyco,
tcp::FlowHandler _tcpFlowHandler,
wns::service::dll::FlowEstablishmentAndRelease _fear,
wns::ldk::ControlServiceRegistry _csr 
)

Definition at line 46 of file Service.cpp.

Service::~Service (  )  [virtual]

Definition at line 71 of file Service.cpp.


Member Function Documentation

void Service::addFlowSeparatorInstance ( const wns::service::tl::FlowID _flowID  ) 

Definition at line 189 of file Service.cpp.

void Service::closeConnection ( wns::service::tl::Connection _connection  )  [virtual]

Parameters:
[in] _connection Connection to close.

Implements wns::service::tl::Service.

Definition at line 222 of file Service.cpp.

void Service::connectionClosed ( const wns::service::tl::FlowID _flowID  )  [virtual]

Implements tcp::HandshakeStrategyHandlerInterface.

Definition at line 321 of file Service.cpp.

void Service::connectionEstablished ( const wns::service::tl::FlowID _flowID  )  [virtual]

Implements tcp::HandshakeStrategyHandlerInterface.

Definition at line 213 of file Service.cpp.

void Service::deleteFlowSeparatorInstance ( const wns::service::tl::FlowID _flowID  ) 

Definition at line 372 of file Service.cpp.

void Service::dllFlowChanged ( wns::service::tl::FlowID  flowID,
wns::service::dll::FlowID  dllFlowID 
)

Definition at line 160 of file Service.cpp.

Connection * Service::getConnection ( const wns::service::tl::FlowID _flowID  ) 

Parameters:
[in] _flowID 

Definition at line 276 of file Service.cpp.

HandshakeStrategyInterface * Service::getHandshakeStrategyFU ( const wns::service::tl::FlowID _flowID  ) 

Definition at line 199 of file Service.cpp.

wns::service::nl::Service * Service::getIPService (  ) 

Definition at line 270 of file Service.cpp.

bool Service::isListening ( wns::service::tl::Port  _port  ) 

Definition at line 264 of file Service.cpp.

bool Service::isValidFlow ( const wns::ldk::ConstKeyPtr _key  )  const [virtual]

Implements wns::ldk::flowseparator::FlowInfoProvider.

Definition at line 297 of file Service.cpp.

void Service::listenOnPort ( wns::service::tl::Port  _port,
wns::service::tl::ConnectionHandler _ch 
) [virtual]

Parameters:
[in] _port On which port to listen.
[in] _ch ConnectionHandler to report incoming connections to.

Implements wns::service::tl::Service.

Definition at line 76 of file Service.cpp.

void Service::openConnection ( wns::service::tl::Port  _port,
wns::service::nl::FQDN  _source,
wns::service::nl::FQDN  _peerAddress,
wns::service::qos::QoSClass  _qosClass,
wns::service::tl::ConnectionHandler _ch 
) [virtual]

openConnectionContinue(..) method continues with the connection establishment after the DLL flow has been established.

Returns:
bool

Implements wns::service::tl::Service.

Definition at line 101 of file Service.cpp.

void Service::openConnectionContinue ( wns::service::tl::FlowID  flowID,
wns::service::dll::FlowID  dllFlowID = 0 
) [virtual]

Definition at line 136 of file Service.cpp.

void Service::passiveClosed ( const wns::service::tl::FlowID _flowID  )  [virtual]

Implements tcp::HandshakeStrategyHandlerInterface.

Definition at line 355 of file Service.cpp.

void Service::passiveOpenConnection ( const wns::service::tl::FlowID _flowID  )  [virtual]

Parameters:
[in] wns::service::tl::FlowID This method is called by the lower convergence to create an instance of the flow separator's prototype iff any application is listening to the source port. The method returns true if an instance is created, false otherwise.
Returns:
bool

Implements tcp::HandshakeStrategyHandlerInterface.

Definition at line 168 of file Service.cpp.

void Service::setDataTransmissionService ( wns::service::nl::Service service  ) 

Definition at line 234 of file Service.cpp.

void Service::setDNSService ( wns::service::nl::DNSService service  ) 

Definition at line 253 of file Service.cpp.

void Service::setTcpFlowHandlerService ( tcp::FlowHandler service  ) 

Definition at line 245 of file Service.cpp.

void Service::stopListenOnPort ( wns::service::tl::Port  _port  ) 

Parameters:
_port 

Definition at line 91 of file Service.cpp.


Member Data Documentation

Definition at line 255 of file Service.hpp.

Definition at line 306 of file Service.hpp.

Definition at line 273 of file Service.hpp.

Definition at line 265 of file Service.hpp.

Definition at line 305 of file Service.hpp.

Definition at line 253 of file Service.hpp.

Definition at line 278 of file Service.hpp.

Definition at line 288 of file Service.hpp.

Definition at line 300 of file Service.hpp.

Definition at line 283 of file Service.hpp.

Definition at line 290 of file Service.hpp.

Definition at line 248 of file Service.hpp.

Definition at line 257 of file Service.hpp.

Definition at line 295 of file Service.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:40 2012 for openWNS by  doxygen 1.5.5