|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mulesoft.cloudhub.client.Connection
public class Connection
Base class for CloudHub interaction.
| Nested Class Summary | |
|---|---|
static class |
Connection.ObjectMapper
|
| Field Summary | |
|---|---|
static String |
DEFAULT_URL
|
| Constructor Summary | |
|---|---|
Connection(String url,
String username,
String password)
|
|
Connection(String url,
String username,
String password,
boolean debug)
|
|
| Method Summary | |
|---|---|
Notification |
create(Notification notification)
Connects to CH to create a notification |
protected com.sun.jersey.api.client.WebResource.Builder |
createBuilder(String path)
|
Notification |
createNotification(String text,
Notification.Priority priority,
String domain,
Map<String,String> customProperties)
Deprecated. |
void |
dismissAllNotifications()
Does what CloudhubConnection.dismissNotification(String) to all the queued notifications in CH |
void |
dismissNotification(String href)
Removes the notification form the read queue |
protected String |
getAPIURL()
|
protected String |
getPassword()
|
protected String |
getUrl()
|
protected String |
getUsername()
|
protected void |
handleErrors(com.sun.jersey.api.client.ClientResponse response)
|
List<Application> |
listApplications()
|
NotificationResults |
listNotifications(Integer maxResults,
Integer offset,
String tenantId)
Lists all the notifications of an app. |
DomainConnection |
on(String domain)
|
boolean |
test()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_URL
| Constructor Detail |
|---|
public Connection(String url,
String username,
String password)
public Connection(String url,
String username,
String password,
boolean debug)
| Method Detail |
|---|
protected final String getUrl()
protected final String getUsername()
protected final String getPassword()
protected final String getAPIURL()
protected com.sun.jersey.api.client.WebResource.Builder createBuilder(String path)
public final DomainConnection on(String domain)
on in interface CloudhubConnectiondomain - The domain of the required connection
A connection for a specific domain
public final boolean test()
test in interface CloudhubConnectionpublic final List<Application> listApplications()
listApplications in interface CloudhubConnection
@Deprecated
public final Notification createNotification(String text,
Notification.Priority priority,
String domain,
Map<String,String> customProperties)
CloudhubConnection.create(Notification) instead
createNotification in interface CloudhubConnectionpublic final Notification create(Notification notification)
Connects to CH to create a notification
create in interface CloudhubConnectionnotification - The notification information that needs to be created in CH
The created notification
public final 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.
listNotifications in interface CloudhubConnectionmaxResults - Maximum number of results. For pagination.
offset - Since which notification. For pagination.
tenantId - Filter by tenant id. If null then don't apply the filter
all existing applications
public final void dismissNotification(String href)
Removes the notification form the read queue
dismissNotification in interface CloudhubConnectionhref - href id of the notification that needs to be dismissed
public final void dismissAllNotifications()
Does what CloudhubConnection.dismissNotification(String) to all the queued notifications in CH
dismissAllNotifications in interface CloudhubConnectionprotected void handleErrors(com.sun.jersey.api.client.ClientResponse response)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||