Class CoreSessionCallback
java.lang.Object
org.apache.activemq.artemis.core.protocol.core.impl.CoreSessionCallback
- All Implemented Interfaces:
SessionCallback
-
Constructor Summary
ConstructorsConstructorDescriptionCoreSessionCallback(String name, ProtocolManager protocolManager, Channel channel, RemotingConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionvoidThis 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, String errorMessage) booleanhasCredits(ServerConsumer consumer) This one gives a chance for Proton to have its own flow control.booleanisWritable(ReadyListener callback, Object protocolContext) intsendLargeMessage(MessageReference ref, ServerConsumer consumer, long bodySize, int deliveryCount) intsendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse) intsendMessage(MessageReference ref, ServerConsumer consumer, int deliveryCount) voidsendProducerCreditsFailMessage(int credits, SimpleString address) voidsendProducerCreditsMessage(int credits, SimpleString address) 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, waitMethods inherited from interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
getCurrentTransaction, hasCredits, supportsDirectDelivery
-
Constructor Details
-
CoreSessionCallback
public CoreSessionCallback(String name, ProtocolManager protocolManager, Channel channel, RemotingConnection connection)
-
-
Method Details
-
setSessionHandler
-
close
public void close(boolean failed) - Specified by:
closein interfaceSessionCallback
-
isWritable
- 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, 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
- Specified by:
sendMessagein interfaceSessionCallback
-
sendProducerCreditsMessage
- Specified by:
sendProducerCreditsMessagein interfaceSessionCallback
-
browserFinished
Description copied from interface:SessionCallbackSome protocols (Openwire) needs a special message with the browser is finished.- Specified by:
browserFinishedin interfaceSessionCallback
-
afterDelivery
Description 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
- Specified by:
sendProducerCreditsFailMessagein interfaceSessionCallback
-
closed
public void closed()- Specified by:
closedin interfaceSessionCallback
-
disconnect
- Specified by:
disconnectin interfaceSessionCallback
-
hasCredits
Description copied from interface:SessionCallbackThis one gives a chance for Proton to have its own flow control.- Specified by:
hasCreditsin interfaceSessionCallback
-