com.supermap.messagequeue
Class STOMPManager
- java.lang.Object
-
- com.supermap.messagequeue.InternalHandle
-
- com.supermap.messagequeue.STOMPManager
-
public class STOMPManager extends InternalHandle
STOMP manager class. Message bus client scheme based on STOMP protocol
-
-
Constructor Summary
Constructors Constructor and Description STOMPManager()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
connection(java.lang.String uri, java.lang.String usrName, java.lang.String password)
Builds connectionvoid
disconnection()
Disconnectstatic void
initializeLibrary()
Initialization library Initialize the library before using, close the library after finishedSTOMPReceiver
newReceiver(boolean useTopic, java.lang.String name, java.lang.String clientId)
Creates a receiverSTOMPSender
newSender(boolean useTopic, java.lang.String name)
Creates a senderstatic void
shutdownLibrary()
Close library Close the library after finished
-
-
-
Method Detail
-
connection
public boolean connection(java.lang.String uri, java.lang.String usrName, java.lang.String password)
Builds connection- Parameters:
uri
- Service URIusrName
- user namepassword
- user password- Returns:
- If connected successfully, returns true; otherwise, returns false.
-
disconnection
public void disconnection()
Disconnect
-
newSender
public STOMPSender newSender(boolean useTopic, java.lang.String name)
Creates a sender- Parameters:
useTopic
- Whether to use Topic modename
- the destination name- Returns:
- The new sender
-
newReceiver
public STOMPReceiver newReceiver(boolean useTopic, java.lang.String name, java.lang.String clientId)
Creates a receiver- Parameters:
useTopic
- Whether to use Topic modename
- the destination nameclientId
- client ID- Returns:
- The new receiver
-
initializeLibrary
public static void initializeLibrary()
Initialization libraryInitialize the library before using, close the library after finished
-
shutdownLibrary
public static void shutdownLibrary()
Close libraryClose the library after finished
-
-