public class ChannelUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Future<java.lang.Void> |
deployChannel(java.lang.String channelIdOrName)
Deploy a channel.
|
static java.util.List<java.lang.String> |
getChannelIds()
Get all channel Ids.
|
static java.util.List<java.lang.String> |
getChannelNames()
Get all channels names.
|
static DeployedState |
getChannelState(java.lang.String channelIdOrName)
Get the current state of a channel.
|
static DeployedState |
getConnectorState(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the current state of a connector.
|
static java.lang.String |
getDeployedChannelId(java.lang.String channelName)
Get the id for a deployed channel.
|
static java.util.List<java.lang.String> |
getDeployedChannelIds()
Get all deployed channel Ids.
|
static java.lang.String |
getDeployedChannelName(java.lang.String channelId)
Get the name for a deployed channel.
|
static java.util.List<java.lang.String> |
getDeployedChannelNames()
Get all deployed channels names.
|
static java.lang.Long |
getErrorCount(java.lang.String channelIdOrName)
Get the error count statistic for a specific channel.
|
static java.lang.Long |
getErrorCount(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the error count statistic for a specific connector.
|
static java.lang.Long |
getFilteredCount(java.lang.String channelIdOrName)
Get the filtered count statistic for a specific channel.
|
static java.lang.Long |
getFilteredCount(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the filtered count statistic for a specific connector.
|
static java.lang.Long |
getQueuedCount(java.lang.String channelIdOrName)
Get the queued count statistic for a specific channel.
|
static java.lang.Long |
getQueuedCount(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the queued count statistic for a specific connector.
|
static java.lang.Long |
getReceivedCount(java.lang.String channelIdOrName)
Get the received count statistic for a specific channel.
|
static java.lang.Long |
getReceivedCount(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the received count statistic for a specific connector.
|
static java.lang.Long |
getSentCount(java.lang.String channelIdOrName)
Get the sent count statistic for a specific channel.
|
static java.lang.Long |
getSentCount(java.lang.String channelIdOrName,
java.lang.Number metaDataId)
Get the sent count statistic for a specific connector.
|
static Future<java.lang.Void> |
haltChannel(java.lang.String channelIdOrName)
Halt a deployed channel.
|
static boolean |
isChannelDeployed(java.lang.String channelIdOrName)
Check if a channel is currently deployed.
|
static Future<java.lang.Void> |
pauseChannel(java.lang.String channelIdOrName)
Pause a deployed channel.
|
static Future<java.lang.Void> |
resetStatistics(java.lang.String channelIdOrName)
Reset all statistics for a specific channel.
|
static Future<java.lang.Void> |
resetStatistics(java.lang.String channelIdOrName,
java.lang.Integer metaDataId)
Reset all statistics for the specified connector on the given channel.
|
static Future<java.lang.Void> |
resetStatistics(java.lang.String channelIdOrName,
java.lang.Integer metaDataId,
java.util.Collection<Status> statuses)
Reset the specified statistics for the specified connector on the given channel.
|
static Future<java.lang.Void> |
resumeChannel(java.lang.String channelIdOrName)
Resume a deployed channel.
|
static Future<java.lang.Void> |
startChannel(java.lang.String channelIdOrName)
Start a deployed channel.
|
static Future<java.lang.Void> |
startConnector(java.lang.String channelIdOrName,
java.lang.Integer metaDataId)
Start a connector on a given channel.
|
static Future<java.lang.Void> |
stopChannel(java.lang.String channelIdOrName)
Stop a deployed channel.
|
static Future<java.lang.Void> |
stopConnector(java.lang.String channelIdOrName,
java.lang.Integer metaDataId)
Stop a connector on a given channel.
|
static Future<java.lang.Void> |
undeployChannel(java.lang.String channelIdOrName)
Undeploy a channel.
|
public static java.util.List<java.lang.String> getChannelNames()
public static java.util.List<java.lang.String> getChannelIds()
public static java.util.List<java.lang.String> getDeployedChannelNames()
public static java.util.List<java.lang.String> getDeployedChannelIds()
public static java.lang.String getDeployedChannelName(java.lang.String channelId)
channelId
- The channel id of the deployed channel.public static java.lang.String getDeployedChannelId(java.lang.String channelName)
channelName
- The channel name of the deployed channel.public static Future<java.lang.Void> startChannel(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> stopChannel(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> pauseChannel(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> resumeChannel(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.java.lang.Exception
public static Future<java.lang.Void> haltChannel(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static DeployedState getChannelState(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.public static Future<java.lang.Void> deployChannel(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.public static Future<java.lang.Void> undeployChannel(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.public static boolean isChannelDeployed(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.public static Future<java.lang.Void> startConnector(java.lang.String channelIdOrName, java.lang.Integer metaDataId) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> stopConnector(java.lang.String channelIdOrName, java.lang.Integer metaDataId) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static DeployedState getConnectorState(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static java.lang.Long getReceivedCount(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static java.lang.Long getReceivedCount(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static java.lang.Long getFilteredCount(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static java.lang.Long getFilteredCount(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static java.lang.Long getQueuedCount(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static java.lang.Long getQueuedCount(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static java.lang.Long getSentCount(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static java.lang.Long getSentCount(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static java.lang.Long getErrorCount(java.lang.String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static java.lang.Long getErrorCount(java.lang.String channelIdOrName, java.lang.Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Future<java.lang.Void> resetStatistics(java.lang.String channelIdOrName) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> resetStatistics(java.lang.String channelIdOrName, java.lang.Integer metaDataId) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the deployed connector. Note that the source connector has a
metadata id of 0 and the aggregate of null.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception
public static Future<java.lang.Void> resetStatistics(java.lang.String channelIdOrName, java.lang.Integer metaDataId, java.util.Collection<Status> statuses) throws java.lang.Exception
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the deployed connector. Note that the source connector has a
metadata id of 0 and the aggregate of null.statuses
- A collection of statuses to reset.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.java.lang.Exception