Package org.serviceconnector.net.res
Class ResponderRegistry
java.lang.Object
org.serviceconnector.registry.Registry<Object,IResponder>
org.serviceconnector.net.res.ResponderRegistry
- All Implemented Interfaces:
IRegistryMXBean
The Class ResponderRegistry. Responder registry stores every responder which completed register process correctly.
- Author:
- JTraber
-
Field Summary
Fields inherited from class org.serviceconnector.registry.Registry
registryMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponder(Object key, IResponder responder) Adds an entry of a responder.voiddump(XMLDumpWriter writer) Dump the responders into the xml writer.Gets the current responder.getFirstResponderForConnectionType(ConnectionType connectionType) Gets the first responder matching given connection type.getResponder(Object key) Gets the responder.Gets all responders.voidremoveResponder(Object key) Removes the responder.voidsetThreadLocal(Object obj) Sets an object in thread local attached to incoming thread.Methods inherited from class org.serviceconnector.registry.Registry
containsKey, get, getEntries, getSize, keySet, keySetArray, put, remove, toString
-
Constructor Details
-
ResponderRegistry
public ResponderRegistry()Instantiates a new responder registry.
-
-
Method Details
-
setThreadLocal
Sets an object in thread local attached to incoming thread. This object can be used later from the same thread. Other threads cannot access earlier set object.- Parameters:
obj- the new thread local
-
addResponder
Adds an entry of a responder.- Parameters:
key- the keyresponder- the responder
-
removeResponder
Removes the responder.- Parameters:
key- the key
-
getResponder
Gets the responder.- Parameters:
key- the key- Returns:
- the responder
-
getResponders
Gets all responders.- Returns:
- the responders
-
dump
Dump the responders into the xml writer.- Parameters:
writer- the writer- Throws:
Exception- the exception
-
getCurrentResponder
Gets the current responder.- Returns:
- the current responder
-
getFirstResponderForConnectionType
Gets the first responder matching given connection type.- Parameters:
connectionType- the connection type- Returns:
- the first responder for connection type
-