public class Solclient
extends java.lang.Object
Solclient.Allocator
factory to create various objectsModifier and Type | Class and Description |
---|---|
static class |
Solclient.Allocator
Used to group the set of allocation factory methods for the different
object types
|
static class |
Solclient.GLOBAL_PROPERTIES
Global Configuration Properties.
|
Constructor and Description |
---|
Solclient() |
Modifier and Type | Method and Description |
---|---|
static int |
createContextForHandle(ContextHandle in_out_contextHandle,
java.lang.String[] properties)
Allocates a new Context which will be bound to a given unbound
ContextHandle . |
static int |
createMessageForHandle(MessageHandle in_out_messageHandle)
Allocate a new message that can be used for storing and sending messages
to and from the Solace Messaging Appliance.
The allocated message will be bound to a given unbound MessageHandle Applications are responsible for releasing all messages allocated by this method, by calling MessageHandle.destroy() |
static int |
createNativeDestinationForHandle(NativeDestinationHandle in_out_NativeDestinationHandle,
Destination destination)
Allocates a NativeDestination resource for the given Destination and
binds it to an unbound
NativeDestinationHandle . |
static MessageHandle |
createNewMessageAndHandle()
A convenience factory method that produces a
MessageHandle with an newly allocated message in the handle. |
static int |
createReplicationGroupMessageIdForHandle(ReplicationGroupMessageIdHandle in_out_ReplicationGroupMessageIdHandle,
java.lang.String rgmidStr)
Allocates a new ReplicationGroupMessageId resource using the serialized ReplicationGroupMessageId String
and binds it to an unbound
ReplicationGroupMessageIdHandle . |
static SolclientErrorInfo |
getLastErrorInfo()
Returns a SolclientErrorInfo instance, which contains the last captured
error information for the calling thread.
|
static long |
getMessageLevelStat(int msgLevelStatEnum)
Returns the value of the specified message statistic.
|
static long |
getQuantaLevelStat(int quantaStatEnum,
int quantaIdx)
Returns the quanta level statistic for the given quantaIdx
|
static Version |
getVersion()
Returns the Java RTO
Version information |
static int |
init(java.lang.String[] properties)
Initializes the Messaging APIs.
This function must be called before any other API interface call is made, with the exception of Solclient.setLogLevel() , which can be called first to set the Log level. |
static boolean |
isInitialized()
Returns a boolean indicating if Messaging APIs has been initialized.
|
static boolean |
isInitilized()
Deprecated.
use
Solclient.isInitialized() instead. |
static int |
setLogLevel(java.util.logging.Level javaLogLevel)
Sets the log level to the desired java logging level.
|
public static int init(java.lang.String[] properties) throws SolclientException
Solclient.setLogLevel()
, which can be called first to set the Log level.
Typically init()
is called once during
program initialization. Only configuration properties named in
Solclient.GLOBAL_PROPERTIES
are processed; other property names
are ignored. Any values not supplied are set to default values. This
function takes care of any required global initialization. Note that the
property values are stored internally in the API, and the caller does not
have to maintain the props array after this call completes. Also, the API
does not modify the properties array when processing the property list.
properties
- An array of name and value string pairs for global
configuration properties, or NULL, if there are no global
properties to set.SolEnum.ReturnCode
:
SolEnum.ReturnCode.OK
SolclientException
public static boolean isInitialized()
Solclient.init()
is called.@Deprecated public static boolean isInitilized()
Solclient.isInitialized()
instead.public static int setLogLevel(java.util.logging.Level javaLogLevel) throws SolclientException
javaLogLevel
- Level
SolEnum.ReturnCode
SolclientException
public static int createMessageForHandle(MessageHandle in_out_messageHandle) throws SolclientException
MessageHandle
MessageHandle.destroy()
in_out_messageHandle
- an unbound MessageHandle which will be bound to the newly
created MessageSolEnum.ReturnCode
:
SolEnum.ReturnCode.OK
SolclientException
public static MessageHandle createNewMessageAndHandle() throws SolclientException
MessageHandle
with an newly allocated message in the handle.
This is equivalent to calling
Allocator.newMessageHandle()
followed by
Solclient.createMessageForHandle()
MessageHandle.destroy()
MessageHandle
SolclientException
public static int createContextForHandle(ContextHandle in_out_contextHandle, java.lang.String[] properties) throws SolclientException
ContextHandle
.
The context properties are supplied as an array of name/value pointer pairs,
where the name and value are both strings. The context properties are reserved
for future use.
Applications are responsible for releasing a context allocated by this
method, by calling
ContextHandle.destroy()
properties
- an array of property name and values, reserved for future use.in_out_contextHandle
- an unbound ContextHandle which will be bound to the newly
created ContextSolEnum.ReturnCode
SolclientException
public static int createNativeDestinationForHandle(NativeDestinationHandle in_out_NativeDestinationHandle, Destination destination)
NativeDestinationHandle
. A
NativeDestinationHandle
should be used in all cases when a destination
needs to be set and reused in fast operations when efficiency is important.
Note: A MutableTopic
is not supported as a Destination
for this operation. There is no advantage to using a NativeDestination
for a MutableTopic. A MutableTopic can be used directly when publishing
and subscribing as efficiently as a NativeDestinationin_out_NativeDestinationHandle
- an unbound NativeDestinationHandledestination
- SolEnum.ReturnCode
:
SolEnum.ReturnCode.OK
public static Version getVersion() throws SolclientException
Version
informationVersion
instanceSolclientException
public static SolclientErrorInfo getLastErrorInfo() throws SolclientException
This method is typically invoked from within callback listener invocations (Session and Flow), to get more info on the reported event.
SolclientException
public static long getQuantaLevelStat(int quantaStatEnum, int quantaIdx) throws SolclientException
quantaStatEnum
- , one of
SolEnum.QuantaLevelStat
quantaIdx
- index of the quanta, an int in {0..NUM_MSG_QUANTA}SolclientException
public static long getMessageLevelStat(int msgLevelStatEnum) throws SolclientException
msgLevelStatEnum
- , one of
SolEnum.MessageLevelStat
SolclientException
public static int createReplicationGroupMessageIdForHandle(ReplicationGroupMessageIdHandle in_out_ReplicationGroupMessageIdHandle, java.lang.String rgmidStr)
ReplicationGroupMessageIdHandle
.in_out_ReplicationGroupMessageIdHandle
- an unbound ReplicationGroupMessageIdHandlergmidStr
- SolEnum.ReturnCode
:
SolEnum.ReturnCode.OK
Copyright 2004-2024 Solace Corporation. All rights reserved.