com.pcbsys.nirvana.client.p2p.nService Class Reference

This class provides a base for all P2P Services. More...

#include <nService.h>

Inheritance diagram for com.pcbsys.nirvana.client.p2p.nService:

com.pcbsys.nirvana.client.p2p.nEventService com.pcbsys.nirvana.client.p2p.nOutOfBandService com.pcbsys.nirvana.client.p2p.nStreamService

Public Member Functions

void close ()
 Closes the service and informs the remote service that it has been closed.
nServiceInfogetServiceInfo ()
 Returns the description of the service connected to.
nServiceStateListenergetStateListener ()
 Return the state listener associated with this service.
bool isClosed ()
 Returns a flag indicating if the service has been closed with the close() method.
bool isConnected ()
 Returns whether the service is physically connected to the realm.
void setStateListener (nServiceStateListener *pListener)
 Set the listener that will receive callbacks for state changes to the service.

Detailed Description

This class provides a base for all P2P Services.

Member Function Documentation

void nService::close (  ) 

Closes the service and informs the remote service that it has been closed.

Exceptions:
Exception if unable to perform the close. See the message for further information

Reimplemented in com.pcbsys.nirvana.client.p2p.nEventService, com.pcbsys.nirvana.client.p2p.nOutOfBandService, and com.pcbsys.nirvana.client.p2p.nStreamService.

nServiceInfo * nService::getServiceInfo (  ) 

Returns the description of the service connected to.

Returns:
Service description

nServiceStateListener * nService::getStateListener (  ) 

Return the state listener associated with this service.

Returns:
the state listener fo this service

bool nService::isClosed (  ) 

Returns a flag indicating if the service has been closed with the close() method.

Returns:
Flag indictating if the service has been closed.

bool nService::isConnected (  ) 

Returns whether the service is physically connected to the realm.

Returns:
true if connected or false otherwise

void nService::setStateListener ( nServiceStateListener pListener  ) 

Set the listener that will receive callbacks for state changes to the service.

Parameters:
*pListener the state listener

Share this page with others:
Tell Your Tweets Facebook It! Add to Delicious Reddit! Digg It! Stumble Upon Add to Your Faves Mixx it
Follow Us:
Keep up with my-Channels on Twitter Become a fan on Facebook LinkedIn Profile Recent Highlights RSS Feed