@Override public SocketAddress localAddress() { return session.getLocalAddress(); }
@Override public SocketAddress localAddress() { return session.getLocalAddress(); }
/** {@inheritDoc} */ @Override public void sessionIdle(IoSession session, IdleStatus status) throws Exception { if (log.isTraceEnabled()) { log.trace("Idle (session: {}) local: {} remote: {}\nread: {} write: {}", session.getId(), session.getLocalAddress(), session.getRemoteAddress(), session.getReadBytes(), session.getWrittenBytes()); } String sessionId = (String) session.getAttribute(RTMPConnection.RTMP_SESSION_ID); if (sessionId != null) { RTMPMinaConnection conn = (RTMPMinaConnection) RTMPConnManager.getInstance().getConnectionBySessionId(sessionId); if (conn != null) { // close the idle socket conn.onInactive(); } } }
((InetSocketAddress) session.getLocalAddress()).getPort(); if (portCharsets.containsKey(port)) { decoder = portCharsets.get(port).get();
/** * @see IoSession#getLocalAddress() */ public SocketAddress getLocalAddress() { return wrappedSession.getLocalAddress(); }
public void sessionCreated(IoSession session) throws Exception { // SocketSessionConfig cfg = (SocketSessionConfig) session.getConfig(); // cfg.setSoLinger(0); log.debug("sessionCreated:" + session.getLocalAddress()); }
public void operationComplete(IoFuture future) { synchronized (TAKEN_LOCAL_ADDRESSES) { TAKEN_LOCAL_ADDRESSES.remove(future.getSession().getLocalAddress()); } } }
public void messageSent( IoSession session, Object message ) { if ( LOG.isDebugEnabled() ) { LOG.debug( "{} -> {} SENT: " + message, session.getRemoteAddress(), session.getLocalAddress() ); } }
@Override public ResourceAddress get(IoSession session) { SocketAddress localAddress = session.getLocalAddress(); if (localAddress instanceof ResourceAddress) { return (ResourceAddress) localAddress; } return super.get(session); }
public void operationComplete(IoFuture future) { synchronized (TAKEN_LOCAL_ADDRESSES) { TAKEN_LOCAL_ADDRESSES.remove(future.getSession() .getLocalAddress()); } } }
public void sessionOpened( IoSession session ) { LOG.debug( "{} -> {} OPENED", session.getRemoteAddress(), session .getLocalAddress() ); }
public void sessionClosed( IoSession session ) { LOG.debug( "{} -> {} CLOSED", session.getRemoteAddress(), session .getLocalAddress() ); }
@Override protected IoHandler getHandler(IoSession session, boolean throwIfNull) throws Exception { IoHandler handler = (IoHandler)session.getAttribute(DELEGATE_KEY); if (handler == null && throwIfNull) { throw new Exception("No handler found for: " + session.getLocalAddress()); } return handler; } }
public void operationComplete(IoFuture future) { synchronized (TAKEN_LOCAL_ADDRESSES) { TAKEN_LOCAL_ADDRESSES.remove(future.getSession().getLocalAddress()); } } }
@Override public void sessionCreated(IoSession session) throws Exception { super.sessionCreated(session); log.info("MINA session created: local={}, {}, remote={}", session.getLocalAddress(), session.getClass(), session.getRemoteAddress()); }
@Override public void sessionCreated(IoSession session) throws Exception { super.sessionCreated(session); log.info("MINA session created: local={}, {}, remote={}", session.getLocalAddress(), session.getClass(), session.getRemoteAddress()); }
@Override public void sessionCreated(IoSession session) throws Exception { super.sessionCreated(session); log.info("MINA session created: local=" + session.getLocalAddress() + ", " + session.getClass() + ", remote=" + session.getRemoteAddress()); }
@Override public void sessionOpened(IoSession session) throws Exception { String vin = manager.getVin(); System.out.println("Opening a session to " + session.getRemoteAddress() + " from vin:" + vin); System.out.println("Local session address: " + session.getLocalAddress()); // Send VIN to Server //InitPacket initPackage = new InitPacket(vin); Init2Packet initPackage = new Init2Packet(vin); initPackage.is_simulator = manager.getIs_Simulator(); session.write(initPackage); }
public void sessionCreated( IoSession session ) throws Exception { LOG.debug( "{} CREATED", session.getLocalAddress() ); session.getFilterChain().addFirst( "codec", new ProtocolCodecFilter( new DhcpProtocolCodecFactory() ) ); }
@Override public void sessionCreated(IoSession session) throws Exception { super.sessionCreated(session); session.setAttribute(SessionConnector.QF_SESSION, quickfixSession); NetworkingOptions networkingOptions = getNetworkingOptions(); quickfixSession.setResponder(new IoSessionResponder(session, networkingOptions.getSynchronousWrites(), networkingOptions.getSynchronousWriteTimeout(), quickfixSession.getMaxScheduledWriteRequests())); quickfixSession.getLog().onEvent("MINA session created: local=" + session.getLocalAddress() + ", " + session.getClass() + ", remote=" + session.getRemoteAddress()); }