public final class MessageReceiver extends Object implements AmqpReceiver
| Modifier and Type | Field and Description |
|---|---|
protected ScheduledExecutorService |
executor |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
close() |
void |
closeSync() |
static CompletableFuture<MessageReceiver> |
create(MessagingFactory factory,
String name,
String recvPath,
int prefetchCount,
ReceiverSettingsProvider settingsProvider) |
String |
getClientId() |
ErrorContext |
getContext() |
protected Exception |
getLastKnownError() |
String |
getReceivePath() |
Duration |
getReceiveTimeout() |
protected CompletableFuture<Void> |
onClose() |
void |
onClose(org.apache.qpid.proton.amqp.transport.ErrorCondition condition) |
void |
onError(Exception exception) |
void |
onOpenComplete(Exception exception) |
void |
onReceiveComplete(org.apache.qpid.proton.engine.Delivery delivery) |
CompletableFuture<Collection<org.apache.qpid.proton.message.Message>> |
receive(int maxMessageCount) |
protected void |
setClosed() |
void |
setReceiveTimeout(Duration value) |
protected void |
throwIfClosed() |
protected final ScheduledExecutorService executor
public static CompletableFuture<MessageReceiver> create(MessagingFactory factory, String name, String recvPath, int prefetchCount, ReceiverSettingsProvider settingsProvider)
public String getReceivePath()
public Duration getReceiveTimeout()
public void setReceiveTimeout(Duration value)
public CompletableFuture<Collection<org.apache.qpid.proton.message.Message>> receive(int maxMessageCount)
public void onOpenComplete(Exception exception)
onOpenComplete in interface AmqpLinkexception - completionException=null if open is successfulpublic void onReceiveComplete(org.apache.qpid.proton.engine.Delivery delivery)
onReceiveComplete in interface AmqpReceiverpublic void onClose(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
public ErrorContext getContext()
protected CompletableFuture<Void> onClose()
protected Exception getLastKnownError()
public String getClientId()
protected final void setClosed()
public final CompletableFuture<Void> close()
public final void closeSync()
throws EventHubException
EventHubExceptionprotected final void throwIfClosed()
Copyright © 2019. All rights reserved.