Eksporter (0) Skriv ut
Vis alt
EN
Dette innholdet er ikke tilgjengelig på ditt språk, men her er den engelske versjonen.

MessagingFactory Class

Represents a messaging factory. This is the anchor class used for run-time operations that send and receive messages to and from queues, topics, or subscriptions.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public abstract class MessagingFactory : MessageClientEntity

The MessagingFactory type exposes the following members.

  NameDescription
Public propertyAddressGets the base address of the messaging factory.
Public propertyIsClosed (Inherited from ClientEntity.)
Public propertyNamespaceEndpointsGets a list of namespace endpoints.
Public propertyPrefetchCountGets or sets the number of messages that the message receiver can simultaneously request.
Public propertyRetryPolicy (Inherited from ClientEntity.)
Protected propertyThisLock (Inherited from ClientEntity.)
Top

  NameDescription
Public methodAbortPerforms abort functionality on the messaging entity. (Inherited from ClientEntity.)
Public methodAcceptMessageSession()Returns available sessions across all session-enabled subscriptions and queues in the service namespace.
Public methodAcceptMessageSession(TimeSpan)Returns available sessions across all session-enabled subscriptions and queues in the service namespace.
Public methodAcceptMessageSessionAsync()Asynchronously returns available sessions across all session-enabled subscriptions and queues in the service namespace.
Public methodAcceptMessageSessionAsync(TimeSpan)Asynchronously returns available sessions across all session-enabled subscriptions and queues in the service namespace.
Public methodBeginAcceptMessageSession(AsyncCallback, Object)Begin an asynchronous operation to accept a message session.
Public methodBeginAcceptMessageSession(TimeSpan, AsyncCallback, Object)Begin an asynchronous operation to accept a message session.
Public methodBeginCloseBegins an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.)
Public methodStatic memberBeginCreate(IEnumerable<String>, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(IEnumerable<Uri>, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(String, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(Uri, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(IEnumerable<String>, MessagingFactorySettings, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(IEnumerable<String>, TokenProvider, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(IEnumerable<Uri>, MessagingFactorySettings, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(IEnumerable<Uri>, TokenProvider, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(String, MessagingFactorySettings, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(String, TokenProvider, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(Uri, MessagingFactorySettings, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodStatic memberBeginCreate(Uri, TokenProvider, AsyncCallback, Object)Begins an asynchronous request to create a MessagingFactory object.
Public methodBeginCreateMessageReceiver(String, AsyncCallback, Object)Begins a create message receiver.
Public methodBeginCreateMessageReceiver(String, ReceiveMode, AsyncCallback, Object)Begins a create message receiver.
Public methodBeginCreateMessageSender(String, AsyncCallback, Object)Begins a create message sender.
Public methodBeginCreateMessageSender(String, String, AsyncCallback, Object)Begins a create message sender.
Public methodBeginPairNamespaceBegins a namespace pairing.
Public methodCloseSends a cleanup message to Service Bus to signal the completion of the usage of an entity. (Inherited from ClientEntity.)
Public methodCloseAsyncSends a cleanup message asynchronously to Service Bus to signal the completion of the usage of an entity. (Inherited from ClientEntity.)
Public methodStatic memberCreate()Creates a new messaging factory object.
Public methodStatic memberCreate(IEnumerable<String>)Creates a new MessagingFactory object.
Public methodStatic memberCreate(IEnumerable<Uri>)Creates a new MessagingFactory object.
Public methodStatic memberCreate(String)Creates a new MessagingFactory object.
Public methodStatic memberCreate(Uri)Creates a new MessagingFactory object.
Public methodStatic memberCreate(IEnumerable<String>, MessagingFactorySettings)Creates a new MessagingFactory object.
Public methodStatic memberCreate(IEnumerable<String>, TokenProvider)Creates a new MessagingFactory object.
Public methodStatic memberCreate(IEnumerable<Uri>, MessagingFactorySettings)Creates a new MessagingFactory object.
Public methodStatic memberCreate(IEnumerable<Uri>, TokenProvider)Creates a new MessagingFactory object.
Public methodStatic memberCreate(String, MessagingFactorySettings)Creates a new MessagingFactory object.
Public methodStatic memberCreate(String, TokenProvider)Creates a new MessagingFactory object.
Public methodStatic memberCreate(Uri, MessagingFactorySettings)Creates a new MessagingFactory object.
Public methodStatic memberCreate(Uri, TokenProvider)Creates a new MessagingFactory object.
Public methodStatic memberCreateAsync(IEnumerable<String>)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(IEnumerable<Uri>)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(String)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(Uri)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(IEnumerable<String>, MessagingFactorySettings)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(IEnumerable<String>, TokenProvider)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(IEnumerable<Uri>, MessagingFactorySettings)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(IEnumerable<Uri>, TokenProvider)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(String, MessagingFactorySettings)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(String, TokenProvider)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(Uri, MessagingFactorySettings)Asynchronously creates a new messaging factory object.
Public methodStatic memberCreateAsync(Uri, TokenProvider)Asynchronously creates a new messaging factory object.
Public methodCreateEventHubClientCreates a new EventHubClient object using the specified path.
Public methodStatic memberCreateFromConnectionStringCreates a new MessagingFactory object from a connection string.
Public methodCreateMessageReceiver(String)Creates a message receiver.
Public methodCreateMessageReceiver(String, ReceiveMode)Creates a message receiver.
Public methodCreateMessageReceiverAsync(String)Asynchronously creates a message receiver.
Public methodCreateMessageReceiverAsync(String, ReceiveMode)Asynchronously creates a message receiver.
Public methodCreateMessageSender(String)Creates a message sender.
Public methodCreateMessageSender(String, String)Creates a message sender.
Public methodCreateMessageSenderAsync(String)Asynchronously creates a message sender.
Public methodCreateMessageSenderAsync(String, String)Asynchronously creates a message sender.
Public methodCreateQueueClient(String)Creates a new queue client.
Public methodCreateQueueClient(String, ReceiveMode)Creates a new queue client.
Public methodCreateSubscriptionClient(String, String)Creates a subscription client.
Public methodCreateSubscriptionClient(String, String, ReceiveMode)Creates a new subscription client.
Public methodCreateTopicClientCreates a new topic client.
Public methodEndAcceptMessageSessionEnds an asynchronous request to accept a MessagingFactory object.
Public methodEndCloseFinishes an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.)
Public methodStatic memberEndCreateEnds an asynchronous request to create a MessagingFactory object.
Public methodEndCreateMessageReceiverEnds a create message receiver.
Public methodEndCreateMessageSenderEnds a create message sender.
Public methodEndPairNamespaceEnds the namespace pairing.
Public methodEquals (Inherited from Object.)
Protected methodFaultFor internal use only. Do not inherit from this class. (Inherited from ClientEntity.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetSettingsRetrieves a copy of the settings of the messaging factory.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnAbortExecutes the abort action. (Overrides ClientEntity.OnAbort().)
Protected methodOnAcceptMessageSessionExecutes the accept message session.
Protected methodOnAcceptSessionReceiverExecutes the accept session receiver action.
Protected methodOnBeginAcceptMessageSessionExecutes the begin accept message session action.
Protected methodOnBeginAcceptSessionReceiverExecutes the begin accept session receiver action.
Protected methodOnBeginCloseExecutes the begin close action. (Overrides ClientEntity.OnBeginClose(TimeSpan, AsyncCallback, Object).)
Protected methodOnBeginCreateMessageReceiverExecutes the begin create message receiver action.
Protected methodOnBeginCreateMessageSender(String, TimeSpan, AsyncCallback, Object)Executes the begin create message sender action.
Protected methodOnBeginCreateMessageSender(String, String, TimeSpan, AsyncCallback, Object)Executes the begin create message sender action.
Protected methodOnBeginOpen (Inherited from ClientEntity.)
Protected methodOnCloseExecutes the close action. (Overrides ClientEntity.OnClose(TimeSpan).)
Protected methodOnClosed (Inherited from ClientEntity.)
Protected methodOnCreateEventHubClientExecutes the create event hub client action.
Protected methodOnCreateMessageReceiverExecutes the create message receiver action.
Protected methodOnCreateMessageSender(String, TimeSpan)Executes the create message sender action.
Protected methodOnCreateMessageSender(String, String, TimeSpan)Executes the create message sender action.
Protected methodOnCreateQueueClientExecutes the create queue client action.
Protected methodOnCreateSubscriptionClient(String, ReceiveMode)Executes a create subscription client action.
Protected methodOnCreateSubscriptionClient(String, String, ReceiveMode)Executes a create subscription client action.
Protected methodOnCreateTopicClientExecutes the create topic client action.
Protected methodOnEndAcceptMessageSessionExecutes the end accept message session action.
Protected methodOnEndAcceptSessionReceiverExecutes the end accept session receiver action.
Protected methodOnEndCloseExecutes the end close action. (Overrides ClientEntity.OnEndClose(IAsyncResult).)
Protected methodOnEndCreateMessageReceiverExecutes the end create message receiver action.
Protected methodOnEndCreateMessageSenderExecutes the end create message sender action.
Protected methodOnEndOpen (Inherited from ClientEntity.)
Protected methodOnFaulted (Inherited from ClientEntity.)
Protected methodOnOpen (Inherited from ClientEntity.)
Protected methodOnOpened (Inherited from ClientEntity.)
Public methodPairNamespaceAsyncAsynchronously pairs a namespace.
Protected methodThrowIfClosed (Inherited from ClientEntity.)
Protected methodThrowIfDisposed (Inherited from ClientEntity.)
Protected methodThrowIfDisposedOrImmutable (Inherited from ClientEntity.)
Protected methodThrowIfDisposedOrNotOpen (Inherited from ClientEntity.)
Protected methodThrowIfFaulted (Inherited from ClientEntity.)
Public methodToString (Inherited from Object.)
Top

Please note that any member method with CreateXXXClient, such as CreateQueueClient(String), does not create a new entity in the service namespace. It only retrieves a handle to an existing entity created earlier using the NamespaceManager object. If these entities do not exist in the service namespace, you will receive an exception.

Also note that settings are only applied when provided through constructor methods and cannot be modified later.

string Address = "sb://myapp.WindowsAzure.com/"; //base address of namespace you are connecting to.
MessagingFactorySettings MsgFactorySettings = new MessagingFactorySettings(); //specify operating timeout (optional)
MessagingFactory MsgFactory = MessagingFactory.Create(Address, MsgFactorySettings);

Any public static (Shared in Visual Basic) members of this type are thread safe. Instance members are also guaranteed to be thread safe.

Fellesskapsinnhold

Legg til
Vis:
© 2014 Microsoft