Server.ReceiveDataListener
is a (non-static) inner class. You are creating it from a static context. You need to supply an instance of Server
to be the outer instance. However, almost certainly you want ReceiveDataListener
to be a static nested class, or probably an outer class.