This class implements Cache & NamedCache and is intended for use when a implementation code refers to a
named cache, but at runtime caching is not required.
The direction parameter can have one of 2 values :[Request | Response]
If the value is Request, a Source Node is sending a Notification to a Target Node
If the value is Response, a Target Node is sending a Response to a Notification back to the Source Node
where the Notification originated from
In this method we determine what targetIP and targetPort to use based on the following logic:
if direction == Request
if targetNode.ID != null
Retrieve RegisteredAddress using targetNode.ID
else
Read targetNode.IP and targetPort.PORT from TargetSelectionFactory.getTargetIPForSource()
else if direction == Response
Read the targetNode.IP
Read the targetNode.PORT
connectToServer(targetIP,targetPort,sourceNode,action,date,payload)