@Override
	public void init() throws IOException
	{
		try
		{
			onInit();
			
			initialized = true;
		}
		catch (IOException e)
		{
			throw e;
		}
		catch (RuntimeException e)
		{
			throw e;
		}
		
		if (initialized)
		{
			outbound = new PriorityQueue<RemoteMethodCall>();
			inbound = new ArrayDeque<RemoteMethodCall>();
			bufferOut = new ArrayDeque<ByteBuffer>();
			buffer = protocol.allocateBuffer();
			lastUpdateTime = System.currentTimeMillis();
            closed = false;
		}
	}