Created
April 25, 2016 16:37
-
-
Save davengeo/6bf49e843e1b8af737e44e47ba52ba30 to your computer and use it in GitHub Desktop.
My first default method in java 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ChainOfMessageProcessors extends MessagePostProcessor { | |
void setNext(ChainOfMessageProcessors next); | |
ChainOfMessageProcessors next(); | |
default Message toNext(Message message) throws JMSException { | |
if (next()!=null) { | |
return next().postProcessMessage(message); | |
} | |
return message; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment