@Deprecated public class Hub extends Object
Constructor and Description |
---|
Hub(HubDAO dao,
Verifier verifier,
Notifier notifier,
FeedFetcher fetcher)
Deprecated.
Constructs a new Hub instance
|
Hub(HubDAO dao,
Verifier verifier,
Notifier notifier,
FeedFetcher fetcher,
Set<String> validSchemes,
Set<Integer> validPorts,
Set<String> validTopics)
Deprecated.
Constructs a new Hub instance.
|
Modifier and Type | Method and Description |
---|---|
void |
sendNotification(String requestHost,
String topic)
Deprecated.
Sends a notification to the subscribers
|
Boolean |
subscribe(String callback,
String topic,
String verify,
long lease_seconds,
String secret,
String verify_token)
Deprecated.
Subscribes to a topic.
|
Boolean |
unsubscribe(String callback,
String topic,
String verify,
String secret,
String verifyToken)
Deprecated.
|
public Hub(HubDAO dao, Verifier verifier, Notifier notifier, FeedFetcher fetcher)
dao
- The persistence HubDAO to useverifier
- The verification strategy to use.public Hub(HubDAO dao, Verifier verifier, Notifier notifier, FeedFetcher fetcher, Set<String> validSchemes, Set<Integer> validPorts, Set<String> validTopics)
dao
- The persistence HubDAO to useverifier
- The verification strategy to usevalidSchemes
- A list of valid URI schemes for callbacks (default: http, https)validPorts
- A list of valid port numbers for callbacks (default: any)validTopics
- A set of valid topic URIs which can be subscribed to (default: any)public void sendNotification(String requestHost, String topic)
requestHost
- the host name the hub is running on. (Used for the user agent)topic
- the URL of the topic that was updated.HttpStatusCodeException
- a wrapper exception with a recommended status code for the
request.public Boolean subscribe(String callback, String topic, String verify, long lease_seconds, String secret, String verify_token)
callback
- Callback URItopic
- Topic URIverify
- Verification Typelease_seconds
- Duration of the leasesecret
- Secret valueverify_token
- verify_token;HttpStatusCodeException
- a wrapper exception with a recommended status code for the
request.Copyright © 2020. All rights reserved.