T
- public interface Function<T>
This function can be registered using theclass Function<IOException>() { public void on(IOEXception ex) { } }
Socket.on(Function)
as
This is the equivalent of doingsocket.on(new Function<IOEXception>() { .... }
Anonymous functions call also be invoked if asocket.on(Event.ERROR, new Function<IOEXception>() { .... }
Decoder
match its type
socket.decoder(new Decoder<String, POJO>(){ @Override public POJO decode(Event e, String message) { return new POJO(message); } } .on(new Function<POJO>() { .... }
void on(T t)
t
- A function that will be invoked when a object of type T is defined.Copyright © 2015. All Rights Reserved.