public class

IONConnector

extends Object
java.lang.Object
   ↳ org.mule.modules.ion.IONConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Provides the ability to interact with Mule iON from within a Mule application. There are operations to deploy, start, stop, and update applications as well as send notifications from your application to iON.

When running this connector in an application inside iON, it will use token based authentication to access the API. This will allow access and usage of the iON APIs without the need to specify your username and password.

Summary

Fields
private Connection connection
private Logger logger
private Long maxWaitTime Maximum time allowed to deplpoy/undeploy.
private String password iON password.
private String url iON URL.
private String username iON username.
Public Constructors
IONConnector()
Public Methods
Notification createNotification(String message, Notification.Priority priority, String domain, Object payload)
Create a notification inside iON.
void createNotificationFromFlow(String message, Notification.Priority priority, Object payload, boolean includeStacktrace)
Create a notification inside iON for your flow.
void deleteApplication(String domain)
Delete an application.
void deployApplication(File file, String domain, String muleVersion, int workerCount, Map<String, String> environmentVariables)
Deploy specified application.
void dismissAllNotifications()
Dismiss all notifications.
void dismissNotification(String href)
Dismiss an individual notification.
Application getApplication(String domain)
Get an application.
static String getStackTrace(Throwable aThrowable)
List<Application> listApplications()
List applications.
NotificationResults listNotifications(String domain, Integer maxResults, Integer offset, Boolean includeDismissed)
List a user's notifications.
void setMaxWaitTime(Long maxWaitTime)
void setPassword(String password)
void setUrl(String url)
void setUsername(String username)
void startApplication(String domain)
Start an application.
void stopApplication(String domain)
Stop an application.
void updateApplication(Application application)
Update an application.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private Connection connection

private Logger logger

private Long maxWaitTime

Maximum time allowed to deplpoy/undeploy.

private String password

iON password.

private String url

iON URL.

private String username

iON username.

Public Constructors

public IONConnector ()

Public Methods

public Notification createNotification (String message, Notification.Priority priority, String domain, Object payload)

Create a notification inside iON.

Parameters
message The contents of the notification.
priority The notification priority.
domain The application domain.
payload The payload of the message. If it's an exception, it'll get appended to the message.
Returns
  • The notification that was created.

public void createNotificationFromFlow (String message, Notification.Priority priority, Object payload, boolean includeStacktrace)

Create a notification inside iON for your flow. If not running in an iON environment, this will log to the console.

Parameters
message The contents of the notification.
priority The notification priority.
payload The payload of the message. If it's an exception, it'll get appended to the message.
includeStacktrace If the message payload contains an Exception, whether or not to include the stacktrace. True by default.

public void deleteApplication (String domain)

Delete an application.

Parameters
domain The application domain.

public void deployApplication (File file, String domain, String muleVersion, int workerCount, Map<String, String> environmentVariables)

Deploy specified application.

Parameters
file Mule application to deploy
domain The application domain.
muleVersion The version of Mule, e.g. 3.2.2.
workerCount The number of workers to deploy.
environmentVariables Environment variables for you application.

public void dismissAllNotifications ()

Dismiss all notifications.

public void dismissNotification (String href)

Dismiss an individual notification.

Parameters
href The href property of the Notification object.

public Application getApplication (String domain)

Get an application.

Parameters
domain The application domain.
Returns
  • An application.

public static String getStackTrace (Throwable aThrowable)

Parameters
aThrowable

public List<Application> listApplications ()

List applications.

Returns
  • A list of applications.

public NotificationResults listNotifications (String domain, Integer maxResults, Integer offset, Boolean includeDismissed)

List a user's notifications.

Parameters
domain The domain to list notifications for.
maxResults The maximum number of results to retrieve.
offset The offset to start listing alerts from.
includeDismissed Whether or not to include dismissed messages.
Returns
  • A List of notifications.

public void setMaxWaitTime (Long maxWaitTime)

Parameters
maxWaitTime

public void setPassword (String password)

Parameters
password

public void setUrl (String url)

Parameters
url

public void setUsername (String username)

Parameters
username

public void startApplication (String domain)

Start an application.

Parameters
domain The application domain.

public void stopApplication (String domain)

Stop an application.

Parameters
domain The application domain.

public void updateApplication (Application application)

Update an application.

Parameters
application The application to update.