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:
@@ -216,13 +216,14 @@ public class GenDObjectTask extends Task
|
|||||||
}
|
}
|
||||||
String transport;
|
String transport;
|
||||||
if (hint == null) {
|
if (hint == null) {
|
||||||
transport = "DEFAULT";
|
transport = "";
|
||||||
} else {
|
} else {
|
||||||
transport = "getInstance(\n" +
|
transport = ",\n" +
|
||||||
|
" com.threerings.presents.net.Transport.getInstance(\n" +
|
||||||
" com.threerings.presents.net.Transport.Type." +
|
" com.threerings.presents.net.Transport.Type." +
|
||||||
hint.type().name() + ", " + hint.channel() + ")";
|
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 this field is an array, we need its component types
|
||||||
if (ftype.isArray()) {
|
if (ftype.isArray()) {
|
||||||
|
|||||||
@@ -261,9 +261,9 @@ public abstract class InvocationTask extends Task
|
|||||||
hint = method.getDeclaringClass().getAnnotation(TransportHint.class);
|
hint = method.getDeclaringClass().getAnnotation(TransportHint.class);
|
||||||
}
|
}
|
||||||
if (hint == null) {
|
if (hint == null) {
|
||||||
return "Transport.DEFAULT";
|
return "";
|
||||||
}
|
}
|
||||||
return "Transport.getInstance(Transport.Type." +
|
return ", Transport.getInstance(Transport.Type." +
|
||||||
hint.type().name() + ", " + hint.channel() + ")";
|
hint.type().name() + ", " + hint.channel() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
{
|
{
|
||||||
$type ovalue = this.$field;
|
$type ovalue = this.$field;
|
||||||
requestAttributeChange(
|
requestAttributeChange(
|
||||||
$capfield, $wrapfield, $wrapofield,
|
$capfield, $wrapfield, $wrapofield$transport);
|
||||||
$transport);
|
|
||||||
this.$field = $clonefield;
|
this.$field = $clonefield;
|
||||||
}
|
}
|
||||||
#if ($elemtype)
|
#if ($elemtype)
|
||||||
@@ -29,8 +28,7 @@
|
|||||||
{
|
{
|
||||||
$elemtype ovalue = this.$field[index];
|
$elemtype ovalue = this.$field[index];
|
||||||
requestElementUpdate(
|
requestElementUpdate(
|
||||||
$capfield, index, $wrapelem, $wrapoelem,
|
$capfield, index, $wrapelem, $wrapoelem$transport);
|
||||||
$transport);
|
|
||||||
this.$field[index] = value;
|
this.$field[index] = value;
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -25,9 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
public void update$upfield ($etype elem)
|
public void update$upfield ($etype elem)
|
||||||
{
|
{
|
||||||
requestEntryUpdate(
|
requestEntryUpdate($capfield, $field, elem$transport);
|
||||||
$capfield, $field, elem,
|
|
||||||
$transport);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class ${name}Marshaller extends InvocationMarshaller
|
|||||||
#end
|
#end
|
||||||
sendRequest(arg1, $m.code, new Object[] {
|
sendRequest(arg1, $m.code, new Object[] {
|
||||||
$m.getWrappedArgList(true)
|
$m.getWrappedArgList(true)
|
||||||
}, $m.transport);
|
}$m.transport);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class ${name}Sender extends InvocationSender
|
|||||||
{
|
{
|
||||||
sendNotification(
|
sendNotification(
|
||||||
target, ${name}Decoder.RECEIVER_CODE, ${name}Decoder.$m.code,
|
target, ${name}Decoder.RECEIVER_CODE, ${name}Decoder.$m.code,
|
||||||
new Object[] { $m.getWrappedArgList(false) }, $m.transport);
|
new Object[] { $m.getWrappedArgList(false) }$m.transport);
|
||||||
}
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|||||||
Reference in New Issue
Block a user