GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Jifty::Plugin::PubSub::Connection(3) User Contributed Perl Documentation Jifty::Plugin::PubSub::Connection(3)

Jifty::Plugin::PubSub::Connection - Connection to browser

This class represents a bidirectional channel between the server and the web browser. You may wish to subclass this class as "YourApp::PubSub" to override the "connect", "receive", or "disconnect" methods.

Called when a connection is established from the browser. By default, does nothing.

Subscribes the browser to receive messages on the given topics.

Sends an arbitrary message to the browser. It is not published to the rest of the message bus.

Called when a message is received from the web browser; returns true if the message was processed, false otherwise. If you override this method, be sure you respect this class' return value:

    sub receive {
        my $self = shift;
        my $msg = shift;
        return 1 if $self->SUPER::receive( $msg );
        # ...
    }

Called when the connection to the browser is lost when the browser switches to a new page. This is not immediate, but occurs after a 15-second timeout.

Returns the constructed Jifty::Web object which is seen as "Jifty-"web> whenever in the context of this connection's "connect", "receive", "disconnect", or when page regions are rendered to be sent over this channel. This ensures that "Jifty-"web->current_user> is set whenever it is relevant.

A new Jifty::API object is instantiated for each Jifty::Plugin::PubSub::Connection object. You may wish to limit it to limit which actions can be performed by the web browser.

The AnyMQ::Queue object which listens to events for the client.

Returns a unique identifier associated with this connection.

Creates, validates, and runs an action if it was received by the client; called by "receive".

Called when one or more regions on the page needs to be rendered and pushed to the client, as triggered by an event. The rendered regions will be passed EVENT as an "event" variable. Currently, rendered regions cannot alter the client's subscription set.
2013-02-19 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.