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 SessionCallback
public ServerSession getSession()
public boolean hasCredits(ServerConsumer consumerID)
SessionCallback
hasCredits
in interface SessionCallback
public void sendProducerCreditsMessage(int credits, SimpleString address)
sendProducerCreditsMessage
in interface SessionCallback
public void sendProducerCreditsFailMessage(int credits, SimpleString address)
sendProducerCreditsFailMessage
in interface SessionCallback
public void afterDelivery() throws Exception
SessionCallback
afterDelivery
in interface SessionCallback
Exception
public void browserFinished(ServerConsumer consumer)
SessionCallback
browserFinished
in interface SessionCallback
public boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
SessionCallback
updateDeliveryCountAfterCancel
in interface SessionCallback
public int sendMessage(MessageReference ref, ServerMessage serverMessage, ServerConsumer consumer, int deliveryCount)
sendMessage
in interface SessionCallback
public int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)
sendLargeMessageContinuation
in interface SessionCallback
public int sendLargeMessage(MessageReference ref, ServerMessage msg, ServerConsumer consumer, long bodySize, int deliveryCount)
sendLargeMessage
in interface SessionCallback
public void closed()
closed
in interface SessionCallback
public void disconnect(ServerConsumer consumerId, String queueName)
disconnect
in interface SessionCallback
public void acknowledge(String messageID, String subscriptionID) throws Exception
Exception
public void addSubscription(long consumerID, String subscriptionID, String clientID, String durableSubscriptionName, String destination, String selector, String ack) throws Exception
Exception
public boolean unsubscribe(String id, String durableSubscriptionName, String clientID) throws Exception
Exception
public RemotingConnection getConnection()
public OperationContext getContext()
public boolean isNoLocal()
public void setNoLocal(boolean noLocal)
public void sendInternal(ServerMessageImpl message, boolean direct) throws Exception
Exception
public void sendInternalLarge(ServerMessageImpl message, boolean direct) throws Exception
Exception
Copyright © 2016 The Apache Software Foundation. All rights reserved.