public class ServiceProxy extends TOMSender
| Constructor and Description |
|---|
ServiceProxy(int processId)
Constructor
|
ServiceProxy(int processId,
java.lang.String configHome)
Constructor
|
ServiceProxy(int processId,
java.lang.String configHome,
java.util.Comparator<byte[]> replyComparator,
Extractor replyExtractor)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInvokeTimeout()
Get the amount of time (in seconds) that this proxy will wait for
servers replies before returning null.
|
byte[] |
invoke(byte[] request,
TOMMessageType reqType)
This method sends a request to the replicas, and returns the related reply.
|
void |
invokeAsynchronous(byte[] request,
ReplyListener listener,
int[] targets,
TOMMessageType type) |
byte[] |
invokeOrdered(byte[] request) |
byte[] |
invokeUnordered(byte[] request) |
void |
replyReceived(TOMMessage reply)
This is the method invoked by the client side communication system.
|
void |
setInvokeTimeout(int invokeTimeout)
Set the amount of time (in seconds) that this proxy will wait for
servers replies before returning null.
|
close, generateOperationId, generateRequestId, getCommunicationSystem, getProcessId, getViewManager, init, init, sendMessageToTargets, sendMessageToTargets, TOMulticast, TOMulticast, TOMulticastpublic ServiceProxy(int processId)
bellowpublic ServiceProxy(int processId,
java.lang.String configHome)
bellowpublic ServiceProxy(int processId,
java.lang.String configHome,
java.util.Comparator<byte[]> replyComparator,
Extractor replyExtractor)
processId - Process id for this client (should be different from replicas)configHome - Configuration directory for BFT-SMARTreplyComparator - used for comparing replies from different servers
to extract one returned by f+1replyExtractor - used for extracting the response from the matching
quorum of repliespublic int getInvokeTimeout()
public void setInvokeTimeout(int invokeTimeout)
invokeTimeout - the invokeTimeout to setpublic byte[] invokeOrdered(byte[] request)
public byte[] invokeUnordered(byte[] request)
public void invokeAsynchronous(byte[] request,
ReplyListener listener,
int[] targets,
TOMMessageType type)
public byte[] invoke(byte[] request,
TOMMessageType reqType)
request - Request to be sentreqType - TOM_NORMAL_REQUESTS for service requests, and other for
reconfig requests.public void replyReceived(TOMMessage reply)
reply - The reply delivered by the client side communication system