tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TAP5-1540) Comet Integration
Date Fri, 06 Jun 2014 15:02:02 GMT

     [ https://issues.apache.org/jira/browse/TAP5-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thiago H. de Paula Figueiredo closed TAP5-1540.
-----------------------------------------------

    Resolution: Won't Fix

Lance's library already covers this.

> Comet Integration
> -----------------
>
>                 Key: TAP5-1540
>                 URL: https://issues.apache.org/jira/browse/TAP5-1540
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core, tapestry-ioc
>    Affects Versions: 5.4
>            Reporter: Toby
>
> CometD 2.1 now supports annotations to define CometD services and clients.
> In order to be able to use Comet out-of-the-box in Tapestry, the following annotations
need to be "passed-through" to Tapestry:
> // defnes a comet service
> @Service("chat")
> public class ChatService {     ... }
> // defines comet channels
> @Configure ({"/chat/**","/members/**"})
> protected void configureChatStarStar(ConfigurableServerChannel channel)
> {
>     DataFilterMessageListener noMarkup = 
>       new DataFilterMessageListener(_bayeux, new NoMarkupFilter(),
>       new BadWordFilter());
>     channel.addListener(noMarkup);
>     channel.addAuthorizer(GrantAuthorizer.GRANT_ALL);
> }
> // add a listener
> @Listener("/service/members")
> public void handleMembership(ServerSession client, ServerMessage message)
> {
>  ...
> }
> // client side
> @Service
> MyClient
> {
>     @Session
>     private ClientSession session;
>     @PostConstruct
>     private void init()
>     {
>         ...
>     }
>     @PreDestroy
>     private void destroy()
>     {
>         ...
>     }
>     @Listener("/meta/*")
>     public void handleMetaMessage(Message connect)
>     {
>         ...
>     }
>     @Subscription("/foo")
>     public void handeFoo(Message message)
>     {
>         ...
>     }
> }
> http://cometdaily.com/2011/04/07/559/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message