Package org.glassfish.grizzly.asyncqueue
Interface MessageCloner<E>
-
public interface MessageCloner<E>Cloner, which will be called byAsyncQueueWriter, when message could not be written directly, and will be added to the queue. Cloner may create a clone of original message and return it to theAsyncQueueWriterinstead of original one. Using MessageCloner, developer has a chance to clone a message only in case, when it is really required.- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Eclone(Connection connection, E originalMessage)Method will be called byAsyncQueueWriter, when message could not be written directly, and will be added to the queue.
-
-
-
Method Detail
-
clone
E clone(Connection connection, E originalMessage)
Method will be called byAsyncQueueWriter, when message could not be written directly, and will be added to the queue. Cloner may create a clone of original message and return it to theAsyncQueueWriterinstead of original one. Using MessageCloner, developer has a chance to clone a message only in case, when it is really required.- Parameters:
connection-Connection, where theBufferwill be written.originalMessage-Bufferto be written.- Returns:
- original
Bufferor its clone to be added to asynchronous queue.
-
-