Class CoreSessionCallback
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.core.impl.CoreSessionCallback
-
- All Implemented Interfaces:
SessionCallback
public final class CoreSessionCallback extends Object implements SessionCallback
-
-
Constructor Summary
Constructors Constructor Description CoreSessionCallback(String name, ProtocolManager protocolManager, Channel channel, RemotingConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDelivery()This can be used to complete certain operations outside of the lock, like acks or other operations.voidbrowserFinished(ServerConsumer consumer)Some protocols (Openwire) needs a special message with the browser is finished.voidclose(boolean failed)voidclosed()voiddisconnect(ServerConsumer consumerId, SimpleString queueName)booleanhasCredits(ServerConsumer consumer)This one gives a chance for Proton to have its own flow control.booleanisWritable(ReadyListener callback, Object protocolContext)intsendLargeMessage(MessageReference ref, Message message, ServerConsumer consumer, long bodySize, int deliveryCount)intsendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(MessageReference ref, Message message, ServerConsumer consumer, int deliveryCount)voidsendProducerCreditsFailMessage(int credits, SimpleString address)voidsendProducerCreditsMessage(int credits, SimpleString address)CoreSessionCallbacksetSessionHandler(ServerSessionPacketHandler handler)booleanupdateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)Use this to updates specifics on the message after a redelivery happened.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
getCurrentTransaction, hasCredits, supportsDirectDelivery
-
-
-
-
Constructor Detail
-
CoreSessionCallback
public CoreSessionCallback(String name, ProtocolManager protocolManager, Channel channel, RemotingConnection connection)
-
-
Method Detail
-
setSessionHandler
public CoreSessionCallback setSessionHandler(ServerSessionPacketHandler handler)
-
close
public void close(boolean failed)
- Specified by:
closein interfaceSessionCallback
-
isWritable
public boolean isWritable(ReadyListener callback, Object protocolContext)
- Specified by:
isWritablein interfaceSessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
Description copied from interface:SessionCallbackUse this to updates specifics on the message after a redelivery happened. Return true if there was specific logic applied on the protocol, so the ServerConsumer won't make any adjustments.- Specified by:
updateDeliveryCountAfterCancelin interfaceSessionCallback
-
sendLargeMessage
public int sendLargeMessage(MessageReference ref, Message message, ServerConsumer consumer, long bodySize, int deliveryCount)
- Specified by:
sendLargeMessagein interfaceSessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)
- Specified by:
sendLargeMessageContinuationin interfaceSessionCallback
-
sendMessage
public int sendMessage(MessageReference ref, Message message, ServerConsumer consumer, int deliveryCount)
- Specified by:
sendMessagein interfaceSessionCallback
-
sendProducerCreditsMessage
public void sendProducerCreditsMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsMessagein interfaceSessionCallback
-
browserFinished
public void browserFinished(ServerConsumer consumer)
Description copied from interface:SessionCallbackSome protocols (Openwire) needs a special message with the browser is finished.- Specified by:
browserFinishedin interfaceSessionCallback
-
afterDelivery
public void afterDelivery() throws ExceptionDescription copied from interface:SessionCallbackThis can be used to complete certain operations outside of the lock, like acks or other operations.- Specified by:
afterDeliveryin interfaceSessionCallback- Throws:
Exception
-
sendProducerCreditsFailMessage
public void sendProducerCreditsFailMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsFailMessagein interfaceSessionCallback
-
closed
public void closed()
- Specified by:
closedin interfaceSessionCallback
-
disconnect
public void disconnect(ServerConsumer consumerId, SimpleString queueName)
- Specified by:
disconnectin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(ServerConsumer consumer)
Description copied from interface:SessionCallbackThis one gives a chance for Proton to have its own flow control.- Specified by:
hasCreditsin interfaceSessionCallback
-
-