public final class OMS extends Object
MessagingAccessPoint
from the specified OMS driver url
and some useful util methods.
The complete OMS driver URL syntax is:
oms:<driver_type>://[account_id@]host1[:port1][,host2[:port2],...[,hostN[:portN]]]/<region>
The first part of the URL specifies which OMS implementation is to be used, rocketmq is a optional driver type.
The brackets indicate that the extra access points are optional, and a correct OMS driver url needs at least one access point, which consists of hostname and port, like localhost:8081.
ResourceManager
Modifier and Type | Field and Description |
---|---|
static String |
specVersion
The version format is X.Y.Z (Major.Minor.Patch), a pre-release version may be denoted by appending a hyphen and a
series of dot-separated identifiers immediately following the patch version, like X.Y.Z-alpha.
|
Modifier and Type | Method and Description |
---|---|
static MessagingAccessPoint |
getMessagingAccessPoint(String url)
Returns a
MessagingAccessPoint instance from the specified OMS driver url. |
static MessagingAccessPoint |
getMessagingAccessPoint(String url,
KeyValue attributes)
Returns a
MessagingAccessPoint instance from the specified OMS driver url with some preset attributes,
which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter. |
static KeyValue |
newKeyValue()
Returns a default and internal
KeyValue implementation instance. |
public static String specVersion
OMS version follows semver scheme partially.
public static MessagingAccessPoint getMessagingAccessPoint(String url)
MessagingAccessPoint
instance from the specified OMS driver url.url
- the specified OMS driver urlMessagingAccessPoint
instanceOMSRuntimeException
- if the factory fails to create a MessagingAccessPoint
due to some driver url
some syntax error or internal error.public static MessagingAccessPoint getMessagingAccessPoint(String url, KeyValue attributes)
MessagingAccessPoint
instance from the specified OMS driver url with some preset attributes,
which will be passed to MessagingAccessPoint's implementation class as a unique constructor parameter.
There are some standard attributes defined by OMS for this method, the same as MessagingAccessPoint.attributes()
()}url
- the specified OMS driver urlMessagingAccessPoint
instanceOMSRuntimeException
- if the factory fails to create a MessagingAccessPoint
due to some driver url
some syntax error or internal error.public static KeyValue newKeyValue()
KeyValue
implementation instance.KeyValue
instanceCopyright © 2017–2020 OpenMessaging. All rights reserved.