Package com.thingworx.queueproviders
Class QueueProvider
java.lang.Object
com.thingworx.types.NamedObject
com.thingworx.persistence.common.PersistableNamedObject
com.thingworx.entities.RootEntity
com.thingworx.entities.ServiceProviderEntity
com.thingworx.queueproviders.QueueProvider
- All Implemented Interfaces:
IConfigurableObject,INotScriptFriendly,ISupportsDeprecation,IDiffableObject,IAvatar,IEntityLifeCycleEvent,IPersistable,IServiceProvider,ITaggableObject,IDependencyScannableObject,IEntityDefinition,IPersistableObject<String>,IQueueProvider,IDesignTimeSecurable,IDesignTimeSecurableEntity,IRunTimeSecurable,IRunTimeSecurableEntity,ISecurable,IVisibilitySecurable,IVisibilitySecurableEntity,IAspectContainer,INamedObject,Serializable
@ThingworxExtensionApiClass(since={10,0},
canInstantiate=true)
public abstract class QueueProvider
extends ServiceProviderEntity
implements IQueueProvider
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.thingworx.queueproviders.IQueueProvider
IQueueProvider.IQueueEntryPublisher -
Field Summary
FieldsFields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECTFields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATORFields inherited from interface com.thingworx.queueproviders.IQueueProvider
QUEUE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanService Category: Connectivity Service Description: Connect to the external messaging system using the values specified in the Connection Information configuration table.protected abstract QueueProvider.IQueueConnectioncreateConnection(boolean validateConfiguration) voidDeleteQueue(String queueName, Boolean deleteFromExternalMessagingSystem) Service Category: QueuesManagement Service Description: Delete Queue.protected abstract voiddeleteQueueFromExternalMessagingSystem(String queueName, boolean throwIfNotExists, String errorMessagePrefix) booleanService Category: Connectivity Service Description: Disconnect from the remote system.protected final ValueCollectionfindDeclaredQueueRowCaseSensitive(String fieldName, String fieldValue) GetConnectedIoTStreamForQueue(String queueName) Service Category: QueuesManagement Service Description: Get the name of the IoT Stream that is using the queue with given name.protected final QueueProvider.IQueueConnectionprotected abstract StringReturn the connection target, e.g.Service Category: QueuesManagement Service Description: Get a list of all declared queues.booleanReturns the type of this entity.booleanvoidinitializeQueue(String queueName, ConfigurationTable queueConfig) Perform necessary actions to prepare queue for future writes/reads.Service Category: Connectivity Service Description: Check whether the Queue Provider is currently connected to the external messaging system.Service Category: Connectivity Service Description: Performs a test to verify the connectivity to the external messaging system using the values specified in the Connection Information configuration table.Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequestMethods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies, validateConfigurationMethods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransientMethods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thingworx.types.INamedObject
getDescription, getNameMethods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasIDMethods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getNameMethods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Field Details
-
PROP_QUEUEPROVIDERPACKAGENAME
- See Also:
-
CONNECTION_INFO
- See Also:
-
DECLARED_QUEUES
- See Also:
-
-
Constructor Details
-
QueueProvider
public QueueProvider()Initializes this instace with default values.
-
-
Method Details
-
getEnabled
-
getQueueProviderPackageName
-
getIsDefaultQueueProvider
-
getEntityType
@ThingworxExtensionApiMethod(since={10,0}) public final RelationshipTypes.ThingworxRelationshipTypes getEntityType()Description copied from class:RootEntityReturns the type of this entity.
- Specified by:
getEntityTypein classRootEntity- Returns:
- the entity type
-
TestConnectivity
- Service Category:
- Connectivity
- Service Description:
- Performs a test to verify the connectivity to the external messaging system using the values specified in the Connection Information configuration table.
- Returns:
- result An infotable informing whether the configured external messaging system is reachable - INFOTABLE
- Throws:
Exception- if an error occurs
-
IsConnected
- Service Category:
- Connectivity
- Service Description:
- Check whether the Queue Provider is currently connected to the external messaging system.
- Returns:
- result An infotable containing the status of the connection - INFOTABLE
- Throws:
Exception- if an error occurs
-
Connect
@ThingworxExtensionApiMethod(since={10,0}) public boolean Connect(Boolean forceReconnect) throws Exception - Service Category:
- Connectivity
- Service Description:
- Connect to the external messaging system using the values specified in the Connection Information configuration table.
- Parameters:
forceReconnect- If not set, will return true and not attempt connecting if already connected. If set, will disconnect and attempt connecting again.- Returns:
- true if connection attempt succeeded or already connected, otherwise false
- Throws:
Exception- if an error occurs
-
Disconnect
- Service Category:
- Connectivity
- Service Description:
- Disconnect from the remote system.
- Returns:
- true if disconnected successfully or not previously connected, otherwise false.
- Throws:
Exception- if an error occurs
-
GetDeclaredQueues
- Service Category:
- QueuesManagement
- Service Description:
- Get a list of all declared queues.
- Returns:
- result An infotable containing the names of all declared queues - INFOTABLE
- Throws:
Exception- if an error occurs
-
GetConnectedIoTStreamForQueue
@ThingworxExtensionApiMethod(since={10,0}) public String GetConnectedIoTStreamForQueue(String queueName) throws Exception - Service Category:
- QueuesManagement
- Service Description:
- Get the name of the IoT Stream that is using the queue with given name.
- Parameters:
queueName- Queue name - STRING- Returns:
- result The name of the IoT Stream that is using this queue - STRING
- Throws:
Exception- if an error occurs
-
DeleteQueue
@ThingworxExtensionApiMethod(since={10,0}) public void DeleteQueue(String queueName, Boolean deleteFromExternalMessagingSystem) throws Exception - Service Category:
- QueuesManagement
- Service Description:
- Delete Queue.
- Parameters:
queueName- Queue Name - STRINGdeleteFromExternalMessagingSystem- Delete the queue representation from the external messaging system - BOOLEAN- Throws:
Exception- if an error occurs
-
initializeQueue
@ThingworxExtensionApiMethod(since={10,0}) public void initializeQueue(String queueName, ConfigurationTable queueConfig) throws Exception Description copied from interface:IQueueProviderPerform necessary actions to prepare queue for future writes/reads. Could be actions such as creating new queue or validation of existing queue access, etc. Will throw an exception on initialization failure.- Specified by:
initializeQueuein interfaceIQueueProvider- Parameters:
queueName- queue name (if queue not declared, will throw an exception)queueConfig- queue configuration- Throws:
Exception
-
getDeclaredQueues
@ThingworxExtensionApiMethod(since={10,0}) public final List<String> getDeclaredQueues() throws Exception- Throws:
Exception
-
getConnection
@ThingworxExtensionApiMethod(since={10,0}) protected final QueueProvider.IQueueConnection getConnection() -
getConnectionTarget
Return the connection target, e.g. Kafka broker URL, Azure Event Hubs namespace, etc. -
createConnection
@ThingworxExtensionApiMethod(since={10,0}) protected abstract QueueProvider.IQueueConnection createConnection(boolean validateConfiguration) throws Exception - Throws:
Exception
-
deleteQueueFromExternalMessagingSystem
@ThingworxExtensionApiMethod(since={10,0}) protected abstract void deleteQueueFromExternalMessagingSystem(String queueName, boolean throwIfNotExists, String errorMessagePrefix) throws Exception - Throws:
Exception
-
findDeclaredQueueRowCaseSensitive
@ThingworxExtensionApiMethod(since={10,0}) protected final ValueCollection findDeclaredQueueRowCaseSensitive(String fieldName, String fieldValue) throws Exception - Throws:
Exception
-