public class

PuSHHubModule

extends AbstractPuSHModule
java.lang.Object
   ↳ org.mule.module.pubsubhubbub.AbstractPuSHModule
     ↳ org.mule.module.pubsubhubbub.PuSHHubModule
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Allows Mule to act as a PubSubHubbub (aka PuSH) hub.
Pubsubhubbub is a simple, open, web-hook-based pubsub protocol & open source reference implementation.
This module implements the PubSubHubbub Core 0.3 -- Working Draft specification, except 7.5 Aggregated Content Distribution.

Summary

Fields
private DataStore dataStore
private long defaultLeaseSeconds The default lease time in milliseconds.
private PartitionableObjectStore<Serializable> objectStore Any implementation of PartitionableObjectStore can be used as a back-end for the hub.
private Map<HubMode, AbstractHubActionHandler> requestHandlers
private int retryCount The retry count.
private int retryFrequency The retry frequency in milliseconds.
[Expand]
Inherited Fields
From class org.mule.module.pubsubhubbub.AbstractPuSHModule
Public Constructors
PuSHHubModule()
Public Methods
DataStore getDataStore()
long getDefaultLeaseSeconds()
PartitionableObjectStore<Serializable> getObjectStore()
int getRetryCount()
int getRetryFrequency()
String handleHubRequest(String httpMethod, String contentType, Map<String, Object> responseHeaders, String payload)
Handle all hub requests.
void setDefaultLeaseSeconds(long defaultLeaseSeconds)
void setObjectStore(PartitionableObjectStore<Serializable> objectStore)
void setRetryCount(int retryCount)
void setRetryFrequency(int retryFrequency)
void wireResources()
[Expand]
Inherited Methods
From class org.mule.module.pubsubhubbub.AbstractPuSHModule
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware

Fields

private DataStore dataStore

private long defaultLeaseSeconds

The default lease time in milliseconds. Defaults to 7 days.

private PartitionableObjectStore<Serializable> objectStore

Any implementation of PartitionableObjectStore can be used as a back-end for the hub.

private Map<HubMode, AbstractHubActionHandler> requestHandlers

private int retryCount

The retry count. Defaults to 12 times.

private int retryFrequency

The retry frequency in milliseconds. Defaults to 5 minutes.

Public Constructors

public PuSHHubModule ()

Public Methods

public DataStore getDataStore ()

public long getDefaultLeaseSeconds ()

public PartitionableObjectStore<Serializable> getObjectStore ()

public int getRetryCount ()

public int getRetryFrequency ()

public String handleHubRequest (String httpMethod, String contentType, Map<String, Object> responseHeaders, String payload)

Handle all hub requests.

Parameters
httpMethod The HTTP method name
contentType The content-type of the request
responseHeaders The outbound/response headers
payload The message payload
Returns
  • the response body
Throws
MuleException
DecoderException
MuleException

public void setDefaultLeaseSeconds (long defaultLeaseSeconds)

Parameters
defaultLeaseSeconds

public void setObjectStore (PartitionableObjectStore<Serializable> objectStore)

Parameters
objectStore

public void setRetryCount (int retryCount)

Parameters
retryCount

public void setRetryFrequency (int retryFrequency)

Parameters
retryFrequency

public void wireResources ()