2012-10-04 46 views

回答

-2

检查this了。用Java编写的PubSubHubBub 0.3协议的直接用户实现。

用法:

Subscriber subscriber = new SubscriberImpl("subscriber-host",8888); 
Subscription subscription = subscriber.subscribe(URI.create("http://feed-host/my-push-enabled-feed.xml")); 

subscription.setNotificationCallback(new NotificationCallback() 
{ 

    @Override 
    public void handle(SyndFeed feed) 
    { 
     //TODO: Do something with the feed 
    } 
}); 
+0

你知道Java中的中心服务器(而不是发布者)实现吗? –

+0

您是否检查过http://code.google.com/p/pubsubhubbub-java/?和https://code.google.com/p/pubsubhubbub/ – Anshu

+0

code.google.com/p/pubsubhubbub-java只有发布者和订户而不是中心。从wiki https://code.google.com/p/pubsubhubbub/wiki/Hubs,它没有Java集线器实现 –