public class

HubModule

extends Object
implements MuleContextAware
java.lang.Object
   ↳ org.mule.module.pubsubhubbub.HubModule
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 MuleContext muleContext
private PartitionableObjectStore<Serializable> objectStore Any implementation of PartitionableObjectStore can be used as a back-end for the hub.
private Map<HubModeAbstractHubActionHandler> requestHandlers
private int retryCount The retry count.
private int retryFrequency The retry frequency in milliseconds.
Public Constructors
HubModule()
Public Methods
DataStore getDataStore()
long getDefaultLeaseSeconds()
MuleContext getMuleContext()
PartitionableObjectStore<Serializable> getObjectStore()
int getRetryCount()
int getRetryFrequency()
String handleRequest(Object payload, Map<String, Object> responseHeaders)
Handle all hub requests.
void setDefaultLeaseSeconds(long defaultLeaseSeconds)
void setMuleContext(MuleContext muleContext)
void setObjectStore(PartitionableObjectStore<Serializable> objectStore)
void setRetryCount(int retryCount)
void setRetryFrequency(int retryFrequency)
void wireResources()
[Expand]
Inherited Methods
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 MuleContext muleContext

private PartitionableObjectStore<Serializable> objectStore

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

private Map<HubModeAbstractHubActionHandler> 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 HubModule ()

Public Methods

public DataStore getDataStore ()

public long getDefaultLeaseSeconds ()

public MuleContext getMuleContext ()

public PartitionableObjectStore<Serializable> getObjectStore ()

public int getRetryCount ()

public int getRetryFrequency ()

public String handleRequest (Object payload, Map<String, Object> responseHeaders)

Handle all hub requests.

Parameters
payload The message payload
responseHeaders The outbound/response headers
Returns
  • the response body
Throws
MuleException
DecoderException
MuleException

public void setDefaultLeaseSeconds (long defaultLeaseSeconds)

Parameters
defaultLeaseSeconds

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext

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 ()