/** * @see IoSession#getTransportMetadata() */ public TransportMetadata getTransportMetadata() { return wrappedSession.getTransportMetadata(); }
/** * Creates a new instance with the specified POJO. */ public ObjectMBean(T source) { if (source == null) { throw new NullPointerException("source"); } this.source = source; if (source instanceof IoService) { transportMetadata = ((IoService) source).getTransportMetadata(); } else if (source instanceof IoSession) { transportMetadata = ((IoSession) source).getTransportMetadata(); } else { transportMetadata = null; } this.info = createModelMBeanInfo(source); }
/** * Creates a new instance with the specified POJO. * * @param source The original POJO */ public ObjectMBean(T source) { if (source == null) { throw new IllegalArgumentException("source"); } this.source = source; if (source instanceof IoService) { transportMetadata = ((IoService) source).getTransportMetadata(); } else if (source instanceof IoSession) { transportMetadata = ((IoSession) source).getTransportMetadata(); } else { transportMetadata = null; } this.info = createModelMBeanInfo(source); }
if (session.getTransportMetadata().getAddressType() == InetSocketAddress.class) { InetSocketAddress remoteAddress = (InetSocketAddress) session.getRemoteAddress(); InetSocketAddress localAddress = (InetSocketAddress) session.getLocalAddress();
if (session.getTransportMetadata().getAddressType() == InetSocketAddress.class) { InetSocketAddress remoteAddress = (InetSocketAddress) session.getRemoteAddress(); InetSocketAddress localAddress = (InetSocketAddress) session.getLocalAddress();
.toString()); if (session.getTransportMetadata().getAddressType() == InetSocketAddress.class) { InetSocketAddress remoteAddress = (InetSocketAddress) session .getRemoteAddress();
public void sessionCreated( IoSession session ) throws Exception { if ( LOG.isDebugEnabled() ) { LOG.debug( "{} CREATED: {}", session.getRemoteAddress(), session.getTransportMetadata() ); } if ( session.getTransportMetadata().isConnectionless() ) { session.getFilterChain().addFirst( "codec", new ProtocolCodecFilter( DnsProtocolUdpCodecFactory.getInstance() ) ); } else { session.getFilterChain().addFirst( "codec", new ProtocolCodecFilter( DnsProtocolTcpCodecFactory.getInstance() ) ); } }
/** * Gets the identifying attributes of a session as a short string useful for logging purposes. * Example return values: wsn#34 127.0.0.0.1:41234, wsn#34 joe 127.0.0.0.1:41234 * @param session * @return a short string including the numerical session ID, transport name and user or host and port details */ public static String getId(IoSession session) { String result = LOG_ID_ATTRIBUTE.get(session); if (result == null) { result = session.getTransportMetadata().getName() + "#" + session.getId(); String user = LoggingUtils.getUserIdentifier(session); if (user != null) { result = result + " " + user; } LOG_ID_ATTRIBUTE.set(session, result); } return result; }
if (transportMetadataFragmentation && !session.getTransportMetadata().hasFragmentation()) { while (in.hasRemaining()) { if (!doDecode(session, in, out)) {
if (!session.getTransportMetadata().hasFragmentation()) { while (in.hasRemaining()) { if (!doDecode(session, inEx, out)) {
if (transportMetadataFragmentation && !session.getTransportMetadata().hasFragmentation()) { while (in.hasRemaining()) { if (!doDecode(session, in, out)) {
if (!session.getTransportMetadata().hasFragmentation()) { while (in.hasRemaining()) { if (!doDecode(session, in, out)) {