Poco::Remoting::JSON

class Listener

Library: Remoting/JSON
Package: JSON
Header: Poco/Remoting/JSON/Listener.h

Description

The Listener implementation for JSON.

The listener uses a Poco::Net::HTTPServer to accept incoming JSON requests.

For more information about the specific JSON transport implementation, please see the Transport class.

Inheritance

Direct Base Classes: Poco::Remoting::Listener

All Base Classes: Poco::Remoting::Listener

Member Summary

Member Functions: getTransportId, registerObject, start, stop, unregisterObject

Inherited Functions: getLocalEndPoint, getTransportId, registerObject, start, stop, unregisterObject

Constructors

Listener

Listener(
    const std::string & portStr
);

Creates an uninitialized Listener which has the sole purpose of reserving a port entry in the ORB for an external HTTPServer.

Note that the external HTTPServer must have a Poco::Net::HTTPRequestHandlerFactory that creates a JSONRequestHandler for paths starting with "/json".

Listener

Listener(
    Poco::UInt16 port,
    Poco::Net::HTTPServerParams::Ptr pParams = 0
);

Listener

Listener(
    const Poco::Net::ServerSocket & sock,
    Poco::Net::HTTPServerParams::Ptr pParams = 0
);

Creates the listener by setting up a Poco::Net::HTTPServer using the given server socket.

The given Poco::Net::HTTPServerParams pointer (can be null) is passed to the Poco::Net::HTTPServer.

The given socket can be a Poco::Net::SecureServerSocket to enable HTTPS.

Destructor

~Listener virtual

~Listener();

Destroys the Listener.

Member Functions

getTransportId virtual inline

const std::string & getTransportId() const;

Returns the transportId.

See also: Poco::Remoting::Listener::getTransportId()

registerObject inline

void registerObject(
    Poco::AutoPtr < Poco::Remoting::RemoteObject > param351,
    Poco::AutoPtr < Poco::Remoting::Skeleton > param352,
    const Poco::Remoting::Identifiable::ObjectId & param353,
    const Poco::Remoting::Identifiable::TypeId & param354,
    bool
);

Registers the given object with the transport.

start virtual inline

void start();

Starts accepting requests.

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

stop virtual inline

void stop();

Stops accepting requests.

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

unregisterObject inline

void unregisterObject(
    Poco::AutoPtr < Poco::Remoting::RemoteObject > param355
);

Unregisters the given object.