Elijah
4 years ago
4 changed files with 136 additions and 1 deletions
@ -0,0 +1,27 @@
|
||||
package com.fr.third.socketio.listener.interceptor; |
||||
|
||||
import com.fr.third.socketio.AckRequest; |
||||
import com.fr.third.socketio.SocketIOClient; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Desc |
||||
* |
||||
* @author Elijah |
||||
* created on 2021-04-26 |
||||
*/ |
||||
public interface EventInterceptor extends Interceptor { |
||||
default void before(SocketIOClient client, List<Object> params, AckRequest ackRequest){ |
||||
before(client); |
||||
} |
||||
|
||||
default void after(SocketIOClient client, List<Object> params, AckRequest ackRequest){ |
||||
after(client); |
||||
} |
||||
|
||||
default boolean accept(String eventName, SocketIOClient client, List<Object> param){ |
||||
return accept(client); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.third.socketio.listener.interceptor; |
||||
|
||||
import com.fr.third.socketio.SocketIOClient; |
||||
|
||||
/** |
||||
* Desc |
||||
* |
||||
* @author Elijah |
||||
* created on 2021-05-06 |
||||
*/ |
||||
public interface Interceptor { |
||||
default void before(SocketIOClient client){ |
||||
|
||||
} |
||||
|
||||
default void after(SocketIOClient client){ |
||||
|
||||
} |
||||
|
||||
default boolean accept(SocketIOClient client){ |
||||
return true; |
||||
} |
||||
} |
Loading…
Reference in new issue