com.mulesoft.cloudhub.client
Class Connection

java.lang.Object
  extended by com.mulesoft.cloudhub.client.Connection
Direct Known Subclasses:
DomainConnection

public class Connection
extends Object

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
protected  com.sun.jersey.api.client.WebResource.Builder createBuilder(String path)
           
 Notification createNotification(String text, Notification.Priority priority, String domain)
           
 void dismissAllNotifications()
           
 void dismissNotification(String href)
           
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)
           
 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

DEFAULT_URL

public static final String DEFAULT_URL
See Also:
Constant Field Values
Constructor Detail

Connection

public Connection(String url,
                  String username,
                  String password)

Connection

public Connection(String url,
                  String username,
                  String password,
                  boolean debug)
Method Detail

getUrl

protected final String getUrl()

getUsername

protected final String getUsername()

getPassword

protected final String getPassword()

on

public DomainConnection on(String domain)

getAPIURL

protected final String getAPIURL()

createBuilder

protected final com.sun.jersey.api.client.WebResource.Builder createBuilder(String path)

test

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

listApplications

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

createNotification

public Notification createNotification(String text,
                                       Notification.Priority priority,
                                       String domain)

listNotifications

public final NotificationResults listNotifications(Integer maxResults,
                                                   Integer offset)
Parameters:
includeDismissed -
offset -
maxResults -
Returns:
all existing applications

dismissNotification

public final void dismissNotification(String href)

dismissAllNotifications

public final void dismissAllNotifications()

handleErrors

protected void handleErrors(com.sun.jersey.api.client.ClientResponse response)


Copyright © 2012. All Rights Reserved.