2012-10-04 50 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集線器實現 –