Poco::RemotingNG::TCP

class Listener

Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/Listener.h

Description

The RemotingNG Listener implementation for the TCP transport.

Inheritance

Direct Base Classes: Poco::RemotingNG::EventListener

All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::EventListener, Poco::RemotingNG::Listener

Member Summary

Member Functions: connectionManager, createURI, findEventSubscriber, getEventSubscriptionTimeout, getTimeout, handlesURI, protocol, registerObject, setEventSubscriptionTimeout, setTimeout, start, stop, subscribeToEvents, unregisterObject, unsubscribeFromEvents

Inherited Functions: createURI, duplicate, endPoint, handlesURI, protocol, referenceCount, registerObject, release, start, stop, subscribeToEvents, unregisterObject, unsubscribeFromEvents

Types

Ptr

typedef Poco::AutoPtr < Listener > Ptr;

Constructors

Listener

Listener(
    ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);

Creates a passive Event Listener.

This method is used to set up a passive Event Listener on the client. No TCPServer will be created.

Listener

Listener(
    const std::string & endPoint,
    ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);

Creates a Listener for the given endpoint, which must be in <host>:<port> format.

This method will create a Poco::Net::ServerSocket, bind it to the given endpoint address, and set up a TCPServer instance for accepting incoming connections.

Listener

Listener(
    const std::string & endPoint,
    Poco::Net::TCPServerParams::Ptr pParams,
    ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);

Creates a Listener for the given endpoint, which must be in <host>:<port> format.

This method will create a Poco::Net::ServerSocket, bind it to the given endpoint address, and set up a TCPServer instance (using the given params) for accepting incoming connections.

Listener

Listener(
    const std::string & endPoint,
    const Poco::Net::ServerSocket & socket,
    Poco::Net::TCPServerParams::Ptr pParams,
    ConnectionManager & connectionManager = ConnectionManager::defaultManager ()
);

Creates a Listener for the given endpoint, which must be in <host>:<port> format.

This method will use the given server socket, and set up a TCPServer instance (using the given params) for accepting incoming connections.

Note that the given server socket can be a Poco::Net::SecureServerSocket in order to set up a secure connection.

Destructor

~Listener virtual

~Listener();

Destroys the Listener.

Member Functions

connectionManager

ConnectionManager & connectionManager();

Returns the ConnectionManager used by the Listener.

createURI

std::string createURI(
    const Poco::RemotingNG::Identifiable::TypeId & typeId,
    const Poco::RemotingNG::Identifiable::ObjectId & objectId
);

findEventSubscriber

Poco::RemotingNG::EventSubscriber::Ptr findEventSubscriber(
    const std::string & path
) const;

getEventSubscriptionTimeout

Poco::Timespan getEventSubscriptionTimeout() const;

Returns the timeout for event subscriptions.

getTimeout

Poco::Timespan getTimeout() const;

Returns the receive timeout for connections.

handlesURI virtual

bool handlesURI(
    const std::string & uri
);

See also: Poco::RemotingNG::Listener::handlesURI()

protocol virtual

const std::string & protocol() const;

See also: Poco::RemotingNG::Listener::protocol()

registerObject

void registerObject(
    Poco::RemotingNG::RemoteObject::Ptr pRemoteObject,
    Poco::RemotingNG::Skeleton::Ptr pSkeleton
);

setEventSubscriptionTimeout

void setEventSubscriptionTimeout(
    Poco::Timespan timeout
);

Sets the timeout for event subscriptions.

setTimeout

void setTimeout(
    Poco::Timespan timeout
);

Sets the receive timeout for connections.

start virtual

void start();

See also: Poco::RemotingNG::Listener::start()

stop virtual

void stop();

See also: Poco::RemotingNG::Listener::stop()

subscribeToEvents

void subscribeToEvents(
    Poco::RemotingNG::EventSubscriber::Ptr pEventSubscriber
);

unregisterObject

void unregisterObject(
    Poco::RemotingNG::RemoteObject::Ptr pRemoteObject
);

unsubscribeFromEvents

void unsubscribeFromEvents(
    Poco::RemotingNG::EventSubscriber::Ptr pEventSubscriber
);