-
Design Pattern
- Singleton Design Pattern
- Factory Design Pattern
- Factory Method Design Pattern
- Abstract Factory Design Pattern
- Builder Design Pattern
- Prototype Design Pattern
- Object Pool Design Pattern
- Chain of Responsibility Design Pattern
- Command Design Pattern
- Interpreter Design Pattern
- Iterator Design Pattern
- Mediator Design Pattern
- Memento Design Pattern
- Observer Design Pattern
- Observer Design Pattern - Xử Lý Exception
- Strategy Design Pattern
- Template Method Design Pattern
- Visitor Design Pattern
- Null Object Design Pattern
- Adapter Design Pattern
- Bridge Design Pattern
- Composite Design Pattern
- Decorator Design Pattern
- Flyweight Design Pattern
- Proxy Design Pattern
- S.O.L.I.D
- Clean code
- Lập trình socket
- Java Core
- Multi-Thread
- Spring
- Java Web
- Memory Caching
- Message Queue
- DevOps
- Xây dựng một nền tảng
- MongoDB
- MySQL timestamp
- Properties vs yaml
- Kotlin
- Lập Trình Machine Learning với PyTorch
- Mã Nguồn Mở
- Ezy HTTP
- Free Chat
- Một số kinh nghiệm với Git
- Review cho đồng nghiệp!
- Setup Dev Environment
- Hello World
- Create a Server Project
- Handle Client Requests
- Using ezyfox-server-csharp-client
- Using ezyfox-es6-client
- Client React.js Interaction
- Build And Deploy In Local
List of server events (refer to class EzyEventType
):
SERVER_READY
: fired when server ready, let's init all components here
USER_LOGIN
: fired when user login to a zone, let's check user login info here and throw EzyLoginErrorException(EzyLoginError)
when authentication failed
USER_ACCESS_APP
: fired when user access to an app, let's check the accessibility here and throw EzyAccessAppException(EzyAccessAppError)
when you don't want user access to the app
USER_ADDED
: fired when an user has added to a zone
USER_REMOVED
: fired when an user has removed from a zone
SESSION_REMOVED
: fired when a session has removed from server
STREAMING
: fired when a client stream a byte array to server
Handle SERVER_READY event
@EzySingleton @EzyServerEventHandler(SERVER_READY) public class ServerReadyController extends EzyAbstractAppEventController { @Override public void handle(EzyAppContext ctx, EzyServerReadyEvent event) { getLogger().info("simple-chat app: fire custom app ready"); } }
Handle USER_LOGIN event
@EzySingleton @EzyServerEventHandler(USER_LOGIN) public class UserLoginController extends EzyAbstractPluginEventController { @Override public void handle(EzyPluginContext ctx, EzyUserLoginEvent event) { getLogger().info("handle user {} login in", event.getUsername()); String username = event.getUsername(); if(username.startsWith("admin")) throw new EzyLoginErrorException(EzyLoginError.INVALID_USERNAME); } }
-
Design Pattern
- Singleton Design Pattern
- Factory Design Pattern
- Factory Method Design Pattern
- Abstract Factory Design Pattern
- Builder Design Pattern
- Prototype Design Pattern
- Object Pool Design Pattern
- Chain of Responsibility Design Pattern
- Command Design Pattern
- Interpreter Design Pattern
- Iterator Design Pattern
- Mediator Design Pattern
- Memento Design Pattern
- Observer Design Pattern
- Observer Design Pattern - Xử Lý Exception
- Strategy Design Pattern
- Template Method Design Pattern
- Visitor Design Pattern
- Null Object Design Pattern
- Adapter Design Pattern
- Bridge Design Pattern
- Composite Design Pattern
- Decorator Design Pattern
- Flyweight Design Pattern
- Proxy Design Pattern
- S.O.L.I.D
- Clean code
- Lập trình socket
- Java Core
- Multi-Thread
- Spring
- Java Web
- Memory Caching
- Message Queue
- DevOps
- Xây dựng một nền tảng
- MongoDB
- MySQL timestamp
- Properties vs yaml
- Kotlin
- Lập Trình Machine Learning với PyTorch
- Mã Nguồn Mở
- Ezy HTTP
- Free Chat
- Một số kinh nghiệm với Git
- Review cho đồng nghiệp!
- Setup Dev Environment
- Hello World
- Create a Server Project
- Handle Client Requests
- Using ezyfox-server-csharp-client
- Using ezyfox-es6-client
- Client React.js Interaction
- Build And Deploy In Local