com.resilientedge.jockey.peerbridge
Class LoopbackMessenger

java.lang.Object
  |
  +--com.resilientedge.jockey.peerbridge.LoopbackMessenger
All Implemented Interfaces:
PBMessenger

public class LoopbackMessenger
extends java.lang.Object
implements PBMessenger

The PBMessenger is responsible for transmitting messages (generic, requests, replies) from the peer network.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Constructor Summary
LoopbackMessenger(LoopbackPeerGroup group)
          Constructor.
 
Method Summary
 void addMessageObserver(PBMessageObserver observer)
          Add a observer that wishes to receive message notifications.
 PBMessage createMessage()
          Creates a new peer message instance to be sent.
 void removeMessageObserver(PBMessageObserver observer)
          Remove an entity from the list of those interested in messages notifications.
 PBResponseMarker sendAsyncRequest(PBApplication app, PBMessage request, int timeout)
          Transmits a message over the peer network to the target app
 PBSendMarker sendMessage(PBApplication app, PBMessage message)
          Transmits a message over the peer network to the target app
 PBMessage sendRequest(PBApplication app, PBMessage request, int timeout)
          Transmits a request over the peer network to the target app
 PBSendMarker sendResponse(PBMessage request, PBMessage reply)
          Transmits a response over the peer network to the target app
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopbackMessenger

public LoopbackMessenger(LoopbackPeerGroup group)
Constructor.
Method Detail

createMessage

public PBMessage createMessage()
Creates a new peer message instance to be sent.
Specified by:
createMessage in interface PBMessenger
Returns:
new empty, message

sendMessage

public PBSendMarker sendMessage(PBApplication app,
                                PBMessage message)
Transmits a message over the peer network to the target app
Specified by:
sendMessage in interface PBMessenger
Parameters:
app - Description of Parameter
message - Description of Parameter
Returns:
Description of the Returned Value

sendRequest

public PBMessage sendRequest(PBApplication app,
                             PBMessage request,
                             int timeout)
Transmits a request over the peer network to the target app
Specified by:
sendRequest in interface PBMessenger
Parameters:
app - Description of Parameter
request - Description of Parameter
timeout - Description of Parameter
Returns:
Description of the Returned Value

sendAsyncRequest

public PBResponseMarker sendAsyncRequest(PBApplication app,
                                         PBMessage request,
                                         int timeout)
Transmits a message over the peer network to the target app
Specified by:
sendAsyncRequest in interface PBMessenger
Parameters:
app - Description of Parameter
request - Description of Parameter
timeout - Description of Parameter
Returns:
Description of the Returned Value

sendResponse

public PBSendMarker sendResponse(PBMessage request,
                                 PBMessage reply)
Transmits a response over the peer network to the target app
Specified by:
sendResponse in interface PBMessenger
Parameters:
request - Description of Parameter
reply - Description of Parameter
Returns:
Description of the Returned Value

addMessageObserver

public void addMessageObserver(PBMessageObserver observer)
Add a observer that wishes to receive message notifications.
Specified by:
addMessageObserver in interface PBMessenger
Parameters:
observer - entity to add

removeMessageObserver

public void removeMessageObserver(PBMessageObserver observer)
Remove an entity from the list of those interested in messages notifications.
Specified by:
removeMessageObserver in interface PBMessenger
Parameters:
reciever - entity to remove


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.