Package com.cloud.serverpak.handlers
Class RegistryHandler
java.lang.Object
com.cloud.serverpak.handlers.RegistryHandler
The message listener logger class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<Class<? extends AbstractMessage>,RequestHandler> A variable with a listener map. -
Constructor Summary
ConstructorsConstructorDescriptionRegistryHandler(MainHandler mainHandler) Creates a collectionHashMap, puts it in the form of keys message classes, as well as listener methods for processing these messages. -
Method Summary
Modifier and TypeMethodDescriptiongetHandler(Class cl) Returns the listener method from theHashMapcollection, by the class of the received message.
-
Field Details
-
mapHandlers
A variable with a listener map.
-
-
Constructor Details
-
RegistryHandler
Creates a collectionHashMap, puts it in the form of keys message classes, as well as listener methods for processing these messages.- Parameters:
mainHandler- is the main message listener.
-
-
Method Details
-
getHandler
Returns the listener method from theHashMapcollection, by the class of the received message.- Parameters:
cl- Message class.- Returns:
- the listener method in the interface variable.
-