@Test public void testCreation() throws Exception { ChannelHandler handler = provider.createContainer(ChannelHandler.class, applicationHandler); assertNotNull(handler); ChannelInboundHandler inboundHandler = provider.createContainer(ChannelInboundHandler.class, applicationHandler); assertNotNull(inboundHandler); NettyRestHandlerContainer container = provider.createContainer(NettyRestHandlerContainer.class, applicationHandler); assertNotNull(container); }
@Override public <T> T createContainer(Class<T> type, ApplicationHandler application) throws ProcessingException { if (type != NettyRestHandlerContainer.class && (type == null || !ChannelHandler.class.isAssignableFrom(type))) { return null; } return type.cast(new NettyRestHandlerContainer(application)); }
NettyRestHandlerContainerProvider implements ContainerProvider { @Override public <T> T createContainer(Class<T> type, ApplicationHandler application) throws ProcessingException { if (type != NettyRestHandlerContainer.class && (type == null || !ChannelHandler.class.isAssignableFrom(type))) { return null; } return type.cast(new NettyRestHandlerContainer(application)); } }
NettyRestHandlerContainerProvider implements ContainerProvider { @Override public <T> T createContainer(Class<T> type, ApplicationHandler application) throws ProcessingException { if (type != NettyRestHandlerContainer.class && (type == null || !ChannelHandler.class.isAssignableFrom(type))) { return null; } return type.cast(new NettyRestHandlerContainer(application)); }  }
NettyRestHandlerContainerProvider implements ContainerProvider { @Override public <T> T createContainer(Class<T> type, ApplicationHandler application) throws ProcessingException { if (type != NettyRestHandlerContainer.class && (type == null || !ChannelHandler.class.isAssignableFrom(type))) { return null; } return type.cast(new NettyRestHandlerContainer(application)); }  @Override T createContainer(Class<T> type, ApplicationHandler application); }
NettyRestHandlerContainerProvider implements ContainerProvider { @Override public <T> T createContainer(Class<T> type, ApplicationHandler application) throws ProcessingException { if (type != NettyRestHandlerContainer.class && (type == null || !ChannelHandler.class.isAssignableFrom(type))) { return null; } return type.cast(new NettyRestHandlerContainer(application)); }  @Override T createContainer(Class<T> type, ApplicationHandler application);  }