public class BasicAuthJcsmpSessionService extends java.lang.Object implements SessionService
This class provides a way to connect to a Solace broker and receive messages from a queue. The connection is established using basic authentication.
Constructor and Description |
---|
BasicAuthJcsmpSessionService(java.lang.String queueName,
java.lang.String host,
java.lang.String username,
java.lang.String password,
java.lang.String vpnName)
Creates a new
BasicAuthJcsmpSessionService with the given parameters. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Gracefully closes the connection to the service.
|
void |
connect()
Establishes a connection to the service.
|
MessageReceiver |
createReceiver()
Creates a MessageReceiver object for receiving messages from Solace.
|
boolean |
isClosed()
Checks whether the connection to the service is currently closed.
|
public BasicAuthJcsmpSessionService(java.lang.String queueName, java.lang.String host, java.lang.String username, java.lang.String password, java.lang.String vpnName)
BasicAuthJcsmpSessionService
with the given parameters.queueName
- The name of the queue to receive messages from.host
- The host name or IP address of the Solace broker. Format: Host[:Port]username
- The username to use for authentication.password
- The password to use for authentication.vpnName
- The name of the VPN to connect to.public void connect()
SessionService
connect
in interface SessionService
public void close()
SessionService
close
in interface SessionService
public MessageReceiver createReceiver()
SessionService
createReceiver
in interface SessionService
public boolean isClosed()
SessionService
isClosed
in interface SessionService