diff --git a/core/src/main/java/fixio/handlers/FixApplication.java b/core/src/main/java/fixio/handlers/FixApplication.java index aa34eca..0701a5e 100644 --- a/core/src/main/java/fixio/handlers/FixApplication.java +++ b/core/src/main/java/fixio/handlers/FixApplication.java @@ -28,21 +28,34 @@ public interface FixApplication extends ChannelHandler { /** * Invoked after FIX session was successfully established. + * + * @param ctx current {@link ChannelHandlerContext} + * @param msg {@link LogonEvent} message to handle */ void onLogon(ChannelHandlerContext ctx, LogonEvent msg); /** * Invoked after FIX session was closed. + * + * @param ctx current {@link ChannelHandlerContext} + * @param msg {@link LogonEvent} message to handle */ void onLogout(ChannelHandlerContext ctx, LogoutEvent msg); /** * Invoked when message arrived + * + * @param ctx current {@link ChannelHandlerContext} + * @param msg a {@link FixMessage} to handle + * @param out a {@link List} where decoded messages should be added + * */ void onMessage(ChannelHandlerContext ctx, FixMessage msg, List out) throws Exception; /** * Invoked before {@link FixMessageBuilder} is sent. + * + * @param ctx current {@link ChannelHandlerContext} */ void beforeSendMessage(ChannelHandlerContext ctx, FixMessageBuilder messageBuilder) throws Exception; } diff --git a/core/src/main/java/fixio/handlers/FixMessageHandler.java b/core/src/main/java/fixio/handlers/FixMessageHandler.java index 577b6f9..bb7ccba 100644 --- a/core/src/main/java/fixio/handlers/FixMessageHandler.java +++ b/core/src/main/java/fixio/handlers/FixMessageHandler.java @@ -24,6 +24,8 @@ public interface FixMessageHandler { /** * Performs some processing on incoming {@link FixMessage}. * + * @param ctx current ChannelHandlerContext + * @param msg a FixMessage to handle * @return true if message should be handled by following {@link FixMessageHandler} in a chain. */ boolean handle(ChannelHandlerContext ctx, FixMessage msg); diff --git a/core/src/test/java/fixio/FixConversationIT.java b/core/src/test/java/fixio/FixConversationIT.java index f8c9818..84a1391 100644 --- a/core/src/test/java/fixio/FixConversationIT.java +++ b/core/src/test/java/fixio/FixConversationIT.java @@ -124,7 +124,7 @@ public void onMessage(ChannelHandlerContext ctx, FixMessage msg, List ou private class ClientApp extends FixApplicationAdapter { @Override - public void onMessage(ChannelHandlerContext ctx, FixMessage msg, List out) throws Exception { + public void onMessage(ChannelHandlerContext ctx, FixMessage msg, List out) throws InterruptedException { if ("BF".equals(msg.getMessageType())) { conversation.add(msg); client.disconnect();