Use the overloaded default methods for default transport.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5115 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2008-05-22 00:36:20 +00:00
parent 3940a13e32
commit efb1a7c89a
6 changed files with 11 additions and 14 deletions
@@ -216,13 +216,14 @@ public class GenDObjectTask extends Task
}
String transport;
if (hint == null) {
transport = "DEFAULT";
transport = "";
} else {
transport = "getInstance(\n" +
transport = ",\n" +
" com.threerings.presents.net.Transport.getInstance(\n" +
" com.threerings.presents.net.Transport.Type." +
hint.type().name() + ", " + hint.channel() + ")";
}
ctx.put("transport", "com.threerings.presents.net.Transport." + transport);
ctx.put("transport", transport);
// if this field is an array, we need its component types
if (ftype.isArray()) {
@@ -261,9 +261,9 @@ public abstract class InvocationTask extends Task
hint = method.getDeclaringClass().getAnnotation(TransportHint.class);
}
if (hint == null) {
return "Transport.DEFAULT";
return "";
}
return "Transport.getInstance(Transport.Type." +
return ", Transport.getInstance(Transport.Type." +
hint.type().name() + ", " + hint.channel() + ")";
}
@@ -10,8 +10,7 @@
{
$type ovalue = this.$field;
requestAttributeChange(
$capfield, $wrapfield, $wrapofield,
$transport);
$capfield, $wrapfield, $wrapofield$transport);
this.$field = $clonefield;
}
#if ($elemtype)
@@ -29,8 +28,7 @@
{
$elemtype ovalue = this.$field[index];
requestElementUpdate(
$capfield, index, $wrapelem, $wrapoelem,
$transport);
$capfield, index, $wrapelem, $wrapoelem$transport);
this.$field[index] = value;
}
#end
@@ -25,9 +25,7 @@
*/
public void update$upfield ($etype elem)
{
requestEntryUpdate(
$capfield, $field, elem,
$transport);
requestEntryUpdate($capfield, $field, elem$transport);
}
/**
@@ -71,7 +71,7 @@ public class ${name}Marshaller extends InvocationMarshaller
#end
sendRequest(arg1, $m.code, new Object[] {
$m.getWrappedArgList(true)
}, $m.transport);
}$m.transport);
}
#end
}
@@ -20,7 +20,7 @@ public class ${name}Sender extends InvocationSender
{
sendNotification(
target, ${name}Decoder.RECEIVER_CODE, ${name}Decoder.$m.code,
new Object[] { $m.getWrappedArgList(false) }, $m.transport);
new Object[] { $m.getWrappedArgList(false) }$m.transport);
}
#end