ix.iserve.ipc
Class IServeCommStrategy
java.lang.Object
ix.iserve.ipc.IServeCommStrategy
- All Implemented Interfaces:
- IPC.CommunicationStrategy
- Direct Known Subclasses:
- IserveCommunicationStrategy
public class IServeCommStrategy
- extends java.lang.Object
- implements IPC.CommunicationStrategy
A communication strategy that sends all messages via a server.
An agent that uses this strategy must specify an "ipc-server"
parameter as host:port or an "ipc-server-pointer" parameter
that's the URL of a file that contains the base URL for
messages to the server.
The server side is the class IServeCommServer
.
- See Also:
Parameters
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEND_DATE
public static Symbol SEND_DATE
messageListener
protected IPC.MessageListener messageListener
serverBase
protected java.net.URI serverBase
sendUrl
protected java.net.URL sendUrl
nextMessageUrl
protected java.net.URL nextMessageUrl
registerUrl
protected java.net.URL registerUrl
tool
protected IServeCommTool tool
receiveThread
protected IServeCommStrategy.ReceiveThread receiveThread
receiveThreadCount
protected int receiveThreadCount
ableToSend
protected boolean ableToSend
uuid
protected java.lang.String uuid
expectedSeqNo
protected volatile int expectedSeqNo
messageMap
protected MessageMemory messageMap
sendClient
protected HttpObjectClient sendClient
httpUtil
protected HttpUtilities httpUtil
IServeCommStrategy
public IServeCommStrategy()
setTool
void setTool(IServeCommTool tool)
getAgentName
protected java.lang.String getAgentName()
isAbleToSend
boolean isAbleToSend()
setIsAbleToSend
void setIsAbleToSend(boolean v)
getMessageUrlBase
java.lang.String getMessageUrlBase()
setupServer
public void setupServer(java.lang.Object destination,
IPC.MessageListener listener)
- Specified by:
setupServer
in interface IPC.CommunicationStrategy
installCommTool
protected void installCommTool()
initialCommToolTranscript
protected void initialCommToolTranscript()
determineServerBase
protected java.net.URI determineServerBase()
register
public void register(java.lang.String password)
sendObject
public void sendObject(java.lang.Object destination,
java.lang.Object contents)
- Specified by:
sendObject
in interface IPC.CommunicationStrategy
makeSendClient
protected HttpObjectClient makeSendClient()
makeReceiveClient
protected HttpObjectClient makeReceiveClient()
ensureReceiving
void ensureReceiving()
startReceiving
protected void startReceiving()
awaitStartedReceiving
protected void awaitStartedReceiving()
stopReceiving
public void stopReceiving()
stoppedReceiving
protected void stoppedReceiving()
getReceivedContents
protected java.lang.Object getReceivedContents(MessageWrapper message)
reportProblem
public void reportProblem(java.lang.String prefix,
java.lang.Throwable t)
reportIdentityCheckFailure
protected void reportIdentityCheckFailure(HttpRequestException e)
transcript
public void transcript(java.lang.String line)
transcriptLater
public void transcriptLater(java.lang.String line)
do_transcript
protected void do_transcript(java.lang.String line)