com.mulesoft.cloudhub.client
Interface CloudhubConnection

All Known Implementing Classes:
Connection, DomainConnection

public interface CloudhubConnection

Interface of the cloudhub connector

Since:
1.4

Method Summary
 Notification create(Notification notification)
           Connects to CH to create a notification
 Notification createNotification(String text, Notification.Priority priority, String domain, Map<String,String> customProperties)
          Deprecated. 
 void dismissAllNotifications()
           Does what dismissNotification(String) to all the queued notifications in CH
 void dismissNotification(String href)
           Removes the notification form the read queue
 List<Application> listApplications()
           
 NotificationResults listNotifications(Integer maxResults, Integer offset, String tenantId)
           Lists all the notifications of an app.
 DomainConnection on(String domain)
           
 boolean test()
           
 

Method Detail

on

DomainConnection on(String domain)
Parameters:
domain -

The domain of the required connection

Returns:

A connection for a specific domain


test

boolean test()
Returns:
true if provided connection details allow to connect; false otherwise

listApplications

List<Application> listApplications()
Returns:
all existing applications

createNotification

@Deprecated
Notification createNotification(String text,
                                           Notification.Priority priority,
                                           String domain,
                                           Map<String,String> customProperties)
Deprecated. 

Use create(Notification) instead


create

Notification create(Notification notification)

Connects to CH to create a notification

Parameters:
notification -

The notification information that needs to be created in CH

Returns:

The created notification

Throws:

- CloudHub exceptions based on the http response.

Since:
1.4

listNotifications

NotificationResults listNotifications(Integer maxResults,
                                      Integer offset,
                                      String tenantId)

Lists all the notifications of an app.

In the case of a multitenant application those notifications will be filtered by tenant id.

Parameters:
offset -

Since which notification. For pagination.

maxResults -

Maximum number of results. For pagination.

tenantId -

Filter by tenant id. If null then don't apply the filter

Returns:

all existing applications


dismissNotification

void dismissNotification(String href)

Removes the notification form the read queue

Parameters:
href -

href id of the notification that needs to be dismissed


dismissAllNotifications

void dismissAllNotifications()

Does what dismissNotification(String) to all the queued notifications in CH



Copyright © 2012-2013. All Rights Reserved.