code: public void connectSession(final Session session,
  			EventHandler... eventHandlers) throws InterruptedException,
  			Exception
  	{
  		InetSocketAddress udpAddress = null;
  		if (null != udpClient)
  		{
  			udpAddress = doUdpConnection(session);
  		}
  
  		if (null != eventHandlers)
  		{
  			for (EventHandler eventHandler : eventHandlers)
  			{
  				session.addHandler(eventHandler);
  				if (eventHandler instanceof SessionEventHandler)
  				{
  					((SessionEventHandler) eventHandler).setSession(session);
  				}
  			}
  		}
  
  		MessageBuffer<ChannelBuffer> buffer = loginHelper
  				.getLoginBuffer(udpAddress);
  		Event loginEvent = Events.event(buffer, Events.LOG_IN);
  		doTcpConnection(session, loginEvent);
  	}
docs: Connects the session to remote jetserver. Depending on the connection
  parameters provided to LoginHelper, it can connect both TCP and UDP
  transports.
  
  @param session
  The session to be connected to remote jetserver.
  @param eventHandlers
  The handlers to be added to session.
  @throws InterruptedException
  @throws Exception