Updated to use new Client-reference-free style.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6398 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -9,5 +9,5 @@ import com.threerings.presents.client.InvocationReceiver.Registration;
|
||||
*/
|
||||
public interface RegistrationService
|
||||
{
|
||||
void registerReceiver(Client client, Registration registration);
|
||||
void registerReceiver(Registration registration);
|
||||
}
|
||||
|
||||
@@ -41,5 +41,5 @@ public interface TimeBaseService extends InvocationService
|
||||
/**
|
||||
* Requests the oid of the specified time base object be fetched.
|
||||
*/
|
||||
void getTimeOid (Client client, String timeBase, GotTimeBaseListener listener);
|
||||
void getTimeOid (String timeBase, GotTimeBaseListener listener);
|
||||
}
|
||||
|
||||
@@ -282,13 +282,15 @@ public class InvocationMarshaller
|
||||
_invdir.sendRequest(_invOid, _invCode, methodId, args, transport);
|
||||
}
|
||||
|
||||
@Deprecated /** @deprecated use client-argument-free version. */
|
||||
/** @deprecated use client-argument-free version. */
|
||||
@Deprecated
|
||||
protected void sendRequest (Client client, int methodId, Object[] args)
|
||||
{
|
||||
sendRequest(client, methodId, args, Transport.DEFAULT);
|
||||
}
|
||||
|
||||
@Deprecated /** @deprecated use client-argument-free version. */
|
||||
/** @deprecated use client-argument-free version. */
|
||||
@Deprecated
|
||||
protected void sendRequest (Client client, int methodId, Object[] args, Transport transport)
|
||||
{
|
||||
client.getInvocationDirector().sendRequest(_invOid, _invCode, methodId, args, transport);
|
||||
|
||||
@@ -22,10 +22,10 @@ public class RegistrationMarshaller extends InvocationMarshaller
|
||||
public static final int REGISTER_RECEIVER = 1;
|
||||
|
||||
// from interface RegistrationService
|
||||
public void registerReceiver (Client arg1, InvocationReceiver.Registration arg2)
|
||||
public void registerReceiver (InvocationReceiver.Registration arg1)
|
||||
{
|
||||
sendRequest(arg1, REGISTER_RECEIVER, new Object[] {
|
||||
arg2
|
||||
sendRequest(REGISTER_RECEIVER, new Object[] {
|
||||
arg1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ public class TimeBaseMarshaller extends InvocationMarshaller
|
||||
public static final int GET_TIME_OID = 1;
|
||||
|
||||
// from interface TimeBaseService
|
||||
public void getTimeOid (Client arg1, String arg2, TimeBaseService.GotTimeBaseListener arg3)
|
||||
public void getTimeOid (String arg1, TimeBaseService.GotTimeBaseListener arg2)
|
||||
{
|
||||
TimeBaseMarshaller.GotTimeBaseMarshaller listener3 = new TimeBaseMarshaller.GotTimeBaseMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, GET_TIME_OID, new Object[] {
|
||||
arg2, listener3
|
||||
TimeBaseMarshaller.GotTimeBaseMarshaller listener2 = new TimeBaseMarshaller.GotTimeBaseMarshaller();
|
||||
listener2.listener = arg2;
|
||||
sendRequest(GET_TIME_OID, new Object[] {
|
||||
arg1, listener2
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,18 +34,18 @@ public interface PeerService extends InvocationService
|
||||
* Informs the node that the sending peer ratifies its acquisition or release of the specified
|
||||
* lock.
|
||||
*/
|
||||
void ratifyLockAction (Client client, Lock lock, boolean acquire);
|
||||
void ratifyLockAction (Lock lock, boolean acquire);
|
||||
|
||||
/**
|
||||
* Requests that the specified action be invoked on this server.
|
||||
*/
|
||||
void invokeAction (Client client, byte[] serializedAction);
|
||||
void invokeAction (byte[] serializedAction);
|
||||
|
||||
/**
|
||||
* Requests that the specified request be invoked on this server and wants a confirmation
|
||||
* when it's complete.
|
||||
*/
|
||||
void invokeRequest (Client client, byte[] serializedAction, ResultListener listener);
|
||||
void invokeRequest (byte[] serializedAction, ResultListener listener);
|
||||
|
||||
/**
|
||||
* Generates a server status report for this peer and returns it to the supplied listener. The
|
||||
@@ -53,5 +53,5 @@ public interface PeerService extends InvocationService
|
||||
*
|
||||
* @param type the type of report to generate. See ReportManager for more information.
|
||||
*/
|
||||
void generateReport (Client client, String type, ResultListener listener);
|
||||
void generateReport (String type, ResultListener listener);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int GENERATE_REPORT = 1;
|
||||
|
||||
// from interface PeerService
|
||||
public void generateReport (Client arg1, String arg2, InvocationService.ResultListener arg3)
|
||||
public void generateReport (String arg1, InvocationService.ResultListener arg2)
|
||||
{
|
||||
InvocationMarshaller.ResultMarshaller listener3 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, GENERATE_REPORT, new Object[] {
|
||||
arg2, listener3
|
||||
InvocationMarshaller.ResultMarshaller listener2 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener2.listener = arg2;
|
||||
sendRequest(GENERATE_REPORT, new Object[] {
|
||||
arg1, listener2
|
||||
});
|
||||
}
|
||||
|
||||
@@ -57,10 +57,10 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int INVOKE_ACTION = 2;
|
||||
|
||||
// from interface PeerService
|
||||
public void invokeAction (Client arg1, byte[] arg2)
|
||||
public void invokeAction (byte[] arg1)
|
||||
{
|
||||
sendRequest(arg1, INVOKE_ACTION, new Object[] {
|
||||
arg2
|
||||
sendRequest(INVOKE_ACTION, new Object[] {
|
||||
arg1
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int INVOKE_REQUEST = 3;
|
||||
|
||||
// from interface PeerService
|
||||
public void invokeRequest (Client arg1, byte[] arg2, InvocationService.ResultListener arg3)
|
||||
public void invokeRequest (byte[] arg1, InvocationService.ResultListener arg2)
|
||||
{
|
||||
InvocationMarshaller.ResultMarshaller listener3 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, INVOKE_REQUEST, new Object[] {
|
||||
arg2, listener3
|
||||
InvocationMarshaller.ResultMarshaller listener2 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener2.listener = arg2;
|
||||
sendRequest(INVOKE_REQUEST, new Object[] {
|
||||
arg1, listener2
|
||||
});
|
||||
}
|
||||
|
||||
@@ -81,10 +81,10 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int RATIFY_LOCK_ACTION = 4;
|
||||
|
||||
// from interface PeerService
|
||||
public void ratifyLockAction (Client arg1, NodeObject.Lock arg2, boolean arg3)
|
||||
public void ratifyLockAction (NodeObject.Lock arg1, boolean arg2)
|
||||
{
|
||||
sendRequest(arg1, RATIFY_LOCK_ACTION, new Object[] {
|
||||
arg2, Boolean.valueOf(arg3)
|
||||
sendRequest(RATIFY_LOCK_ACTION, new Object[] {
|
||||
arg1, Boolean.valueOf(arg2)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ public abstract class PeerManager
|
||||
// now send it to any remote node that is also appropriate
|
||||
for (PeerNode peer : _peers.values()) {
|
||||
if (peer.nodeobj != null && action.isApplicable(peer.nodeobj)) {
|
||||
peer.nodeobj.peerService.invokeAction(peer.getClient(), actionBytes);
|
||||
peer.nodeobj.peerService.invokeAction(actionBytes);
|
||||
invoked = true;
|
||||
}
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public abstract class PeerManager
|
||||
{
|
||||
PeerNode peer = _peers.get(nodeName);
|
||||
if (peer != null) {
|
||||
peer.nodeobj.peerService.invokeAction(peer.getClient(), flattenAction(action));
|
||||
peer.nodeobj.peerService.invokeAction(flattenAction(action));
|
||||
} else if (nodeName.equals(_nodeName)) {
|
||||
invokeAction(null, flattenAction(action));
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ public abstract class PeerManager
|
||||
{
|
||||
PeerNode peer = _peers.get(nodeName);
|
||||
if (peer != null) {
|
||||
peer.nodeobj.peerService.invokeRequest(peer.getClient(), requestBytes, listener);
|
||||
peer.nodeobj.peerService.invokeRequest(requestBytes, listener);
|
||||
} else if (nodeName.equals(_nodeName)) {
|
||||
invokeRequest(null, requestBytes, listener);
|
||||
}
|
||||
@@ -1370,7 +1370,7 @@ public abstract class PeerManager
|
||||
_acquire = acquire;
|
||||
|
||||
// ratify the action
|
||||
peer.nodeobj.peerService.ratifyLockAction(peer.getClient(), lock, acquire);
|
||||
peer.nodeobj.peerService.ratifyLockAction(lock, acquire);
|
||||
|
||||
// listen for the act to take place
|
||||
peer.nodeobj.addListener(this);
|
||||
|
||||
Reference in New Issue
Block a user