public class StompSession extends Object implements SessionCallback
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(String messageID,
String subscriptionID) |
void |
addSubscription(long consumerID,
String subscriptionID,
String clientID,
String durableSubscriptionName,
String destination,
String selector,
String ack) |
void |
afterDelivery()
This can be used to complete certain operations outside of the lock,
like acks or other operations.
|
void |
browserFinished(ServerConsumer consumer)
Some protocols (Openwire) needs a special message with the browser is finished.
|
void |
closed() |
void |
disconnect(ServerConsumer consumerId,
String queueName) |
RemotingConnection |
getConnection() |
OperationContext |
getContext() |
ServerSession |
getSession() |
boolean |
hasCredits(ServerConsumer consumerID)
This one gives a chance for Proton to have its own flow control.
|
boolean |
isNoLocal() |
boolean |
isWritable(ReadyListener callback) |
void |
sendInternal(ServerMessageImpl message,
boolean direct) |
void |
sendInternalLarge(ServerMessageImpl message,
boolean direct) |
int |
sendLargeMessage(MessageReference ref,
ServerMessage msg,
ServerConsumer consumer,
long bodySize,
int deliveryCount) |
int |
sendLargeMessageContinuation(ServerConsumer consumer,
byte[] body,
boolean continues,
boolean requiresResponse) |
int |
sendMessage(MessageReference ref,
ServerMessage serverMessage,
ServerConsumer consumer,
int deliveryCount) |
void |
sendProducerCreditsFailMessage(int credits,
SimpleString address) |
void |
sendProducerCreditsMessage(int credits,
SimpleString address) |
void |
setNoLocal(boolean noLocal) |
boolean |
unsubscribe(String id,
String durableSubscriptionName,
String clientID) |
boolean |
updateDeliveryCountAfterCancel(ServerConsumer consumer,
MessageReference ref,
boolean failed)
Use this to updates specifics on the message after a redelivery happened.
|
public boolean isWritable(ReadyListener callback)
isWritable in interface SessionCallbackpublic ServerSession getSession()
public boolean hasCredits(ServerConsumer consumerID)
SessionCallbackhasCredits in interface SessionCallbackpublic void sendProducerCreditsMessage(int credits,
SimpleString address)
sendProducerCreditsMessage in interface SessionCallbackpublic void sendProducerCreditsFailMessage(int credits,
SimpleString address)
sendProducerCreditsFailMessage in interface SessionCallbackpublic void afterDelivery()
throws Exception
SessionCallbackafterDelivery in interface SessionCallbackExceptionpublic void browserFinished(ServerConsumer consumer)
SessionCallbackbrowserFinished in interface SessionCallbackpublic boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
SessionCallbackupdateDeliveryCountAfterCancel in interface SessionCallbackpublic int sendMessage(MessageReference ref, ServerMessage serverMessage, ServerConsumer consumer, int deliveryCount)
sendMessage in interface SessionCallbackpublic int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)
sendLargeMessageContinuation in interface SessionCallbackpublic int sendLargeMessage(MessageReference ref, ServerMessage msg, ServerConsumer consumer, long bodySize, int deliveryCount)
sendLargeMessage in interface SessionCallbackpublic void closed()
closed in interface SessionCallbackpublic void disconnect(ServerConsumer consumerId, String queueName)
disconnect in interface SessionCallbackpublic void acknowledge(String messageID, String subscriptionID) throws Exception
Exceptionpublic void addSubscription(long consumerID,
String subscriptionID,
String clientID,
String durableSubscriptionName,
String destination,
String selector,
String ack)
throws Exception
Exceptionpublic boolean unsubscribe(String id, String durableSubscriptionName, String clientID) throws Exception
Exceptionpublic RemotingConnection getConnection()
public OperationContext getContext()
public boolean isNoLocal()
public void setNoLocal(boolean noLocal)
public void sendInternal(ServerMessageImpl message, boolean direct) throws Exception
Exceptionpublic void sendInternalLarge(ServerMessageImpl message, boolean direct) throws Exception
ExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.