public class SqlSpacesReceiver extends java.lang.Object implements info.collide.sqlspaces.commons.Callback, DistributableReceiverInterface
| Constructor and Description |
|---|
SqlSpacesReceiver(DistributableEntityManager entityManager,
java.lang.String clusterName,
java.lang.String peerName)
Create a SqlSpaces Receiver using localhost server
|
SqlSpacesReceiver(DistributableEntityManager entityManager,
java.lang.String clusterName,
java.lang.String peerName,
java.lang.String ipAddress,
int port)
Create a SqlSpaces Receiver using an external server
|
| Modifier and Type | Method and Description |
|---|---|
void |
call(info.collide.sqlspaces.commons.Callback.Command c,
int seq,
info.collide.sqlspaces.commons.Tuple afterTuple,
info.collide.sqlspaces.commons.Tuple beforeTuple) |
Peer |
getMyPeer()
Return the peer associated with the receiver
|
void |
setEntityManager(DistributableEntityManager entityManager)
Set the entity manager
|
void |
start()
Start the receiver
|
void |
stop()
Stop to listen on the interface
|
public SqlSpacesReceiver(DistributableEntityManager entityManager, java.lang.String clusterName, java.lang.String peerName)
entityManager - Entity manager that will receive commandsclusterName - Name of the clusterpeerName - Name of the peerpublic SqlSpacesReceiver(DistributableEntityManager entityManager, java.lang.String clusterName, java.lang.String peerName, java.lang.String ipAddress, int port)
entityManager - Entity manager that will receive commandsclusterName - Name of the clusterpeerName - Name of the peeripAddress - Ip address of the SQLSpaces Serverport - Port of the SQLSpaces Serverpublic void setEntityManager(DistributableEntityManager entityManager)
DistributableReceiverInterfacesetEntityManager in interface DistributableReceiverInterfaceentityManager - Entity manager to modifypublic Peer getMyPeer()
DistributableReceiverInterfacegetMyPeer in interface DistributableReceiverInterfacepublic void start()
throws java.lang.Exception
start in interface DistributableReceiverInterfacejava.lang.Exception - Exceptionpublic void call(info.collide.sqlspaces.commons.Callback.Command c,
int seq,
info.collide.sqlspaces.commons.Tuple afterTuple,
info.collide.sqlspaces.commons.Tuple beforeTuple)
call in interface info.collide.sqlspaces.commons.Callbackpublic void stop()
throws java.lang.Exception
DistributableReceiverInterfacestop in interface DistributableReceiverInterfacejava.lang.Exception - Error during closing the connection