ConnectionStringBuilder 构造函数

定义

重载

ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

Creates a new instance from namespace, entity path and SAS Key name and value.

ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessSingature)

Creates a new instance from namespace, entity path and already generated SAS token.

ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

Creates a new instance from endpoint address of the namesapce, entity path and SAS Key name and value

ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessSingature)

Creates a new instance from endpoint address of the namesapce, entity path and already generated SAS token.

ConnectionStringBuilder(String connectionString)

Creates a new instance from the given connection string. ConnectionString format: Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_KEY or Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessSignatureToken=SHARED_ACCESS_SIGNATURE_TOKEN

ConnectionStringBuilder(String namespaceConnectionString, String entityPath)

Creates a new instance from the given connection string and entity path. A connection string may or may not include the entity path. ConnectionString format: Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_KEY or Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessSignatureToken=SHARED_ACCESS_SIGNATURE_TOKEN

ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

Creates a new instance from namespace, entity path and SAS Key name and value.

public ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

参数

namespaceName
final String

Namespace name (dns suffix - ex: .servicebus.windows.net is not required)

entityPath
final String

Entity path. For queue or topic, use name. For subscription use <topicName>/subscriptions/<subscriptionName>

sharedAccessKeyName
final String

Shared Access Key name

sharedAccessKey
final String

Shared Access Key

ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessSingature)

Creates a new instance from namespace, entity path and already generated SAS token.

public ConnectionStringBuilder(final String namespaceName, final String entityPath, final String sharedAccessSingature)

参数

namespaceName
final String

Namespace name (dns suffix - ex: .servicebus.windows.net is not required)

entityPath
final String

Entity path. For queue or topic, use name. For subscription use <topicName>/subscriptions/<subscriptionName>

sharedAccessSingature
final String

Shared Access Signature already generated

ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

Creates a new instance from endpoint address of the namesapce, entity path and SAS Key name and value

public ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessKeyName, final String sharedAccessKey)

参数

endpointAddress
final URI

namespace level endpoint. This needs to be in the format of scheme://fullyQualifiedServiceBusNamespaceEndpointName

entityPath
final String

Entity path. For queue or topic, use name. For subscription use <topicName>/subscriptions/<subscriptionName>

sharedAccessKeyName
final String

Shared Access Key name

sharedAccessKey
final String

Shared Access Key

ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessSingature)

Creates a new instance from endpoint address of the namesapce, entity path and already generated SAS token.

public ConnectionStringBuilder(final URI endpointAddress, final String entityPath, final String sharedAccessSingature)

参数

endpointAddress
final URI

namespace level endpoint. This needs to be in the format of scheme://fullyQualifiedServiceBusNamespaceEndpointName

entityPath
final String

Entity path. For queue or topic, use name. For subscription use <topicName>/subscriptions/<subscriptionName>

sharedAccessSingature
final String

Shared Access Signature already generated

ConnectionStringBuilder(String connectionString)

Creates a new instance from the given connection string. ConnectionString format: Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_KEY or Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessSignatureToken=SHARED_ACCESS_SIGNATURE_TOKEN

public ConnectionStringBuilder(String connectionString)

参数

connectionString
String

ServiceBus ConnectionString

例外

IllegalConnectionStringFormatException

when the format of the ConnectionString is not valid

ConnectionStringBuilder(String namespaceConnectionString, String entityPath)

Creates a new instance from the given connection string and entity path. A connection string may or may not include the entity path. ConnectionString format: Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_KEY or Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessSignatureToken=SHARED_ACCESS_SIGNATURE_TOKEN

public ConnectionStringBuilder(String namespaceConnectionString, String entityPath)

参数

namespaceConnectionString
String

connections string of the ServiceBus namespace. This doesn't include the entity path.

entityPath
String

path to the entity within the namespace

适用于