Version: 10.17.1
Namespace

solace.SolclientFactory

Contents

namespace solace.SolclientFactory

A singleton used as the main factory for the messaging APIs. The very first operation by any application must be to initialize the API:

SolclientFactory provides methods to construct:

Additionally SolclientFactory manages the logging level in the API.

Static Methods Top

solace.Destination createDurableQueueDestination ( String queueName )
solace.Message createMessage ( )
solace.ReplayStartLocation createReplayStartLocationBeginning ( )
solace.ReplayStartLocation createReplayStartLocationDate ( Date dateTime )
solace.ReplicationGroupMessageId createReplicationGroupMessageId ( string id )
solace.Session createSession ( solace.SessionProperties sessionProperties, solace.MessageRxCBInfo messageCallbackInfo, solace.SessionEventCBInfo eventCallbackInfo )
solace.Destination createTopicDestination ( String topicName )
solace.LogLevel getLogLevel ( )
solace.SolclientFactory init ( solace.SolclientFactoryProperties factoryProps )
void setLogLevel ( solace.LogLevel newLevel )

Static Methods Detail Top

static public solace.Destination createDurableQueueDestination ( String queueName )

Creates a durable queue solace.Destination instance. When the returned Destination is set as the destination of a message via solace.Message#setDestination, the message will be delivered to the Guaranteed Message queue on the Solace Message Router of the same name.

Since 10.0.0

Parameters

String queueName

The queueName of the queue

Return Value

solace.Destination

The newly created queue destination.

static public solace.Message createMessage ( )

Creates a solace.Message instance.

Return Value

solace.Message

a new message instance.

static public solace.ReplayStartLocation createReplayStartLocationBeginning ( )

Creates a ReplayStartLocation solace.ReplayStartLocation instance that when set in MessageConsumerProperties indicates that all messages available in the replay log should be retrieved.

Return Value

solace.ReplayStartLocation

The newly created ReplayStartLocation

static public solace.ReplayStartLocation createReplayStartLocationDate ( Date dateTime )

Creates a ReplayStartLocation solace.ReplayStartLocation instance that when set in MessageConsumerProperties indicates that only messages spooled in the replay log since the given Date should be retrieved.

Parameters

Date dateTime

The Date object the represents the date and time of the replay start location. dateTime is always converted to UTC time if not already a UTC time.

Return Value

solace.ReplayStartLocation

The newly created ReplayStartLocation

static public solace.ReplicationGroupMessageId createReplicationGroupMessageId ( string id )

Creates a solace.ReplicationGroupMessageId instance from string. A ReplicationGroupMessageId is also a solace.ReplayStartLocation instance that when set in MessageConsumerProperties indicates that only messages spooled in the replay log since the message after the given ReplicationGroupMesageId should be replayed.

Parameters

string id

a serialized ReplicationGroupMessageId had previously been returned from solace.ReplicationGroupMessageId.toString.

Return Value

solace.ReplicationGroupMessageId

a new ReplicationGroupMessageId instance

Throws

solace.OperationError

static public solace.Session createSession ( solace.SessionProperties sessionProperties, solace.MessageRxCBInfo messageCallbackInfo, solace.SessionEventCBInfo eventCallbackInfo )

Creates a session instance.

Parameters

solace.SessionProperties sessionProperties

Properties to configure the session.

solace.MessageRxCBInfo messageCallbackInfo

Deprecated: Callback method for messages. Instead applications should receive message events via session.on(solace.SessionEventCode.MESSAGE, (message) => { ... });

(Optional)

solace.SessionEventCBInfo eventCallbackInfo

Deprecated: Callback method for events on the Session. Instaead applications should receive session events via session.on(solace.SessionEventCode.<code>, (event) => { ... });

(Optional)

Return Value

solace.Session

The newly-created session.

Throws

solace.OperationError

if the parameters have an invalid type or value. Subcode: ErrorSubcode.PARAMETER_INVALID_TYPE.

static public solace.Destination createTopicDestination ( String topicName )

Creates a topic solace.Destination instance. When the returned Destination is set as the destination of a message via solace.Message#setDestination, the message will be delivered to direct subscribers or topic endpoints subscribed to the given topic.

Parameters

String topicName

The topic string for the new topic.

Return Value

solace.Destination

The newly created topic destination.

static public solace.LogLevel getLogLevel ( )

Gets the current log level, which was set by solace.SolclientFactory.init or a subsequent call to solace.SolclientFactory.setLogLevel.

Return Value

solace.LogLevel

The current log level.

static public solace.SolclientFactory init ( solace.SolclientFactoryProperties factoryProps )

Initialize global properties. This function must be called before any other API call is made.

Note: After the first call to this method, subsequent calls have no effect.

Parameters

solace.SolclientFactoryProperties factoryProps

The initialization properties for the factory, if required.

(Optional)

solace.LogImpl logger

A logging implementation

(Optional)

solace.LogLevel logLevel

The logging level to use for filtering log events.

(Optional)

solace.SolclientFactoryProfiles profile = solace.SolclientFactoryProfiles.version7

The factory profile. This class cannot be created by an API user; choose one of the static instances from solace.SolclientFactoryProfiles.

(Optional)

Return Value

solace.SolclientFactory

For method chaining

Throws

solace.OperationError

Invalid logger implementation

static public void setLogLevel ( solace.LogLevel newLevel )

This method changes the current log level from the level set when solace.SolclientFactory.init was called.

Parameters

solace.LogLevel newLevel

The new log level to set.

Return Value

void

Throws

solace.OperationError

Invalid log level