public class ModeratorUtils
extends java.lang.Object
Title: Service Event Fabric Core
Description: Contains Moderator-related utilities.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Constructor and Description |
---|
ModeratorUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
checkComponentFullName(java.lang.String nodeName,
java.lang.String componentFullName) |
static boolean |
containsNodeName(java.lang.String componentFullName) |
static java.lang.String |
extractComponentName(java.lang.String componentFullName) |
static java.lang.String |
extractComponentNameFromConsumerName(java.lang.String consumerFullName) |
static java.lang.String |
extractComponentNameName(java.lang.String componentFullName) |
static java.lang.String |
extractComponentNameType(java.lang.String componentFullName) |
static java.lang.String |
extractConsumerName(java.lang.String fullName)
Returns a consumer name extracted from the specified fully qualified name.
|
static java.lang.String |
extractNodeName(java.lang.String componentFullName) |
static java.lang.String |
getConsumerMode(ExchangeRole exchangeRole)
Returns a consumer mode (async, direct or receiver) corresponding to the specified Exchange Role.
|
static int |
getNodeNameIndex(java.lang.String componentFullName) |
static java.lang.String |
getNodeNameWithDelimiter(java.lang.String nodeName) |
static ComponentReference |
lookupComponent(Moderator moderator,
ImmutableEventDatagram event)
Returns the component corresponding to a source of the specified event.
|
static java.lang.String |
makeComponentFullName(FabricComponent component)
Creates a full name of the specified component located in the current node.
|
static java.lang.String |
makeComponentFullName(FabricConnection connection)
Creates a full name of the specified connection located in the current node.
|
static java.lang.String |
makeComponentFullName(java.lang.String nodeName,
FabricComponent component)
Creates a full name of the specified component located in the specified name.
|
static java.lang.String |
makeComponentFullName(java.lang.String nodeName,
FabricConnection connection)
Creates a full name of the specified component located in the specified name.
|
static java.lang.String |
makeComponentFullName(java.lang.String componentType,
java.lang.String componentName) |
static java.lang.String |
makeComponentFullName(java.lang.String nodeName,
java.lang.String componentType,
java.lang.String componentName) |
static java.lang.String |
makeConsumerFullName(ComponentReference component,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified component.
|
static java.lang.String |
makeConsumerFullName(FabricComponent component,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified connection that is located in the current node.
|
static java.lang.String |
makeConsumerFullName(FabricConnection connection,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified connection that is located in the current node.
|
static java.lang.String |
makeConsumerFullName(java.lang.String nodeName,
FabricComponent component,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified component that is located in the specified node.
|
static java.lang.String |
makeConsumerFullName(java.lang.String nodeName,
FabricConnection connection,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified connection that is located in the specified node.
|
static java.lang.String |
makeConsumerFullName(java.lang.String componentFullName,
java.lang.String consumerName)
Creates a full name of a consumer belonging to the specified component.
|
static java.lang.String |
makeConsumerFullName(java.lang.String componentType,
java.lang.String componentName,
java.lang.String consumerName) |
static java.lang.String |
makeConsumerFullName(java.lang.String nodeName,
java.lang.String componentType,
java.lang.String componentName,
java.lang.String consumerName) |
static java.util.List |
splitComponentFullName(java.lang.String name)
Splits the specified full name of a component and returns a list of tokens.
|
static java.util.List |
splitComponentFullName(java.lang.String name,
boolean skipNodeName)
Splits the specified full name of a component and returns a list of tokens.
|
static java.util.List |
splitConsumerFullName(java.lang.String name)
Splits the specified full name of a consumer and returns the list of tokens.
|
static java.util.List |
splitReplicationSourceFullName(java.lang.String name)
Splits the specified full name of a replication source and returns the list of tokens.
|
static java.util.List |
splitReplicationTargetFullName(java.lang.String name)
Splits the specified full name of a replication source and returns the list of tokens.
|
public static boolean containsNodeName(java.lang.String componentFullName)
public static int getNodeNameIndex(java.lang.String componentFullName)
public static java.lang.String extractNodeName(java.lang.String componentFullName)
public static java.lang.String extractComponentName(java.lang.String componentFullName)
public static java.lang.String extractComponentNameType(java.lang.String componentFullName)
public static java.lang.String extractComponentNameName(java.lang.String componentFullName)
public static java.lang.String extractComponentNameFromConsumerName(java.lang.String consumerFullName)
public static java.lang.String getNodeNameWithDelimiter(java.lang.String nodeName)
public static java.lang.String makeComponentFullName(java.lang.String componentType, java.lang.String componentName)
public static java.lang.String makeComponentFullName(java.lang.String nodeName, java.lang.String componentType, java.lang.String componentName)
public static java.lang.String checkComponentFullName(java.lang.String nodeName, java.lang.String componentFullName)
public static java.lang.String makeConsumerFullName(java.lang.String componentType, java.lang.String componentName, java.lang.String consumerName)
public static java.lang.String makeConsumerFullName(java.lang.String nodeName, java.lang.String componentType, java.lang.String componentName, java.lang.String consumerName)
public static java.lang.String makeComponentFullName(FabricComponent component)
component
- the specified component.public static java.lang.String makeComponentFullName(FabricConnection connection)
connection
- the specified connection.public static java.lang.String makeComponentFullName(java.lang.String nodeName, FabricComponent component)
nodeName
- the specified node name.component
- the specified component.public static java.lang.String makeComponentFullName(java.lang.String nodeName, FabricConnection connection)
nodeName
- the specified node name.connection
- the specified connection.public static java.lang.String makeConsumerFullName(FabricComponent component, java.lang.String consumerName)
component
- the specified component.consumerName
- the name of the consumer.public static java.lang.String makeConsumerFullName(FabricConnection connection, java.lang.String consumerName)
connection
- the specified connection.consumerName
- the name of the consumer.public static java.lang.String makeConsumerFullName(java.lang.String nodeName, FabricComponent component, java.lang.String consumerName)
nodeName
- the specified node name.component
- the specified component.consumerName
- the name of the consumer.public static java.lang.String makeConsumerFullName(java.lang.String nodeName, FabricConnection connection, java.lang.String consumerName)
nodeName
- the specified node name.connection
- the specified connection.consumerName
- the name of the consumer.public static java.lang.String makeConsumerFullName(ComponentReference component, java.lang.String consumerName)
component
- the specified component to which the consumer belongs.consumerName
- the name of the consumer.public static java.lang.String makeConsumerFullName(java.lang.String componentFullName, java.lang.String consumerName)
componentFullName
- the full name of the specified component to which the consumer belongs.consumerName
- the name of the consumer.public static java.util.List splitComponentFullName(java.lang.String name) throws FabricException
name
- the full name to be split.FabricException
- if the specified full name has wrong format.public static java.util.List splitComponentFullName(java.lang.String name, boolean skipNodeName) throws FabricException
skipNodeName
parameter value.name
- the full name to be split.skipNodeName
- indicates if a node name can be skipped.FabricException
- if the specified full name has wrong format.public static java.util.List splitConsumerFullName(java.lang.String name) throws FabricException
name
- the full name to be split.FabricException
- if the specified full name has wrong format.public static java.util.List splitReplicationSourceFullName(java.lang.String name) throws FabricException
name
- the full name to be split.FabricException
- if the specified full name has wrong format.public static java.util.List splitReplicationTargetFullName(java.lang.String name) throws FabricException
name
- the full name to be split.FabricException
- if the specified full name has wrong format.public static java.lang.String getConsumerMode(ExchangeRole exchangeRole)
exchangeRole
- the Exchange Role corresponding to the result mode.public static java.lang.String extractConsumerName(java.lang.String fullName)
This method is lightweight and does not validate a format of the specified full name.
fullName
- the full name of the consumer.null
if the full name does not contain a consumer name.public static ComponentReference lookupComponent(Moderator moderator, ImmutableEventDatagram event)
moderator
- the Moderator
.event
- the specified event.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.