public abstract class BasicAuthJcsmpSessionService extends 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.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | BasicAuthJcsmpSessionService.Builder | 
DEFAULT_VPN_NAME| Constructor and Description | 
|---|
| BasicAuthJcsmpSessionService() | 
| Modifier and Type | Method and Description | 
|---|---|
| static BasicAuthJcsmpSessionService.Builder | builder() | 
| void | close()Gracefully closes the connection to the service. | 
| void | connect()Establishes a connection to the service. | 
| MessageProducer | getInitializedProducer(SolaceIO.SubmissionMode submissionMode)Returns a MessageProducer object for publishing messages to Solace. | 
| java.util.Queue<Solace.PublishResult> | getPublishedResultsQueue()Returns the  Queueinstance associated with this session, with the
 asynchronously received callbacks from Solace for message publications. | 
| MessageReceiver | getReceiver()Returns a MessageReceiver object for receiving messages from Solace. | 
| abstract java.lang.String | host()The host name or IP address of the Solace broker. | 
| JCSMPProperties | initializeSessionProperties(JCSMPProperties baseProps)Override this method and provide your specific properties, including all those related to
 authentication, and possibly others too. | 
| abstract java.lang.String | password()The password to use for authentication. | 
| abstract java.lang.String | queueName()The name of the queue to receive messages from. | 
| abstract java.lang.String | username()The username to use for authentication. | 
| abstract java.lang.String | vpnName()The name of the VPN to connect to. | 
equals, hashCode, initializeWriteSessionProperties@Nullable public abstract java.lang.String queueName()
public abstract java.lang.String host()
public abstract java.lang.String username()
public abstract java.lang.String password()
public abstract java.lang.String vpnName()
public static BasicAuthJcsmpSessionService.Builder builder()
public void connect()
SessionServiceconnect in class SessionServicepublic void close()
SessionServiceclose in class SessionServicepublic MessageReceiver getReceiver()
SessionServicegetReceiver in class SessionServicepublic MessageProducer getInitializedProducer(SolaceIO.SubmissionMode submissionMode)
SessionServicegetInitializedProducer in class SessionServicepublic java.util.Queue<Solace.PublishResult> getPublishedResultsQueue()
SessionServiceQueue instance associated with this session, with the
 asynchronously received callbacks from Solace for message publications. The queue
 implementation has to be thread-safe for production use-cases.getPublishedResultsQueue in class SessionServicepublic JCSMPProperties initializeSessionProperties(JCSMPProperties baseProps)
SessionServiceYou should add your properties to the parameter baseProperties, and return the result.
The method will be used whenever the session needs to be created or refreshed. If you are setting credentials with expiration, just make sure that the latest available credentials (e.g. renewed token) are set when the method is called.
For a list of all the properties that can be set, please check the following link:
initializeSessionProperties in class SessionService