List of usage examples for io.netty.channel.local LocalChannel hasAttr
@Override
public <T> boolean hasAttr(AttributeKey<T> key)
From source file:com.turo.pushy.apns.AugmentingReflectiveChannelFactoryTest.java
License:Open Source License
@Test public void testNewChannel() { final AttributeKey<String> attributeKey = AttributeKey.valueOf(getClass(), "attributeKey"); final AugmentingReflectiveChannelFactory<LocalChannel, String> factory = new AugmentingReflectiveChannelFactory<>( LocalChannel.class, attributeKey, "Test!"); final LocalChannel channel = factory.newChannel(); assertTrue("Newly-created channels should have attribute provided to factory.", channel.hasAttr(attributeKey)); }