this.remoteURI = remoteURI;
}
public InvocationResult invoke(Invocation invocation) throws Throwable {
MarshalledObject mo = InvocationSupport.getMarshaledValue(invocation);
// URI remoteURI = InvocationSupport.getRemoteURI(invocation);
InvocationType type = InvocationSupport.getInvocationType(invocation);
if (type == null)
type = InvocationType.REQUEST;
Msg msg = transportClient.createMsg();
msg.pushMarshaledObject(mo);
if (type == InvocationType.REQUEST) {
msg = transportClient.sendRequest(remoteURI, msg);
return new SimpleInvocationResult(true, msg.popMarshaledObject());
} else {
transportClient.sendDatagram(remoteURI, msg);
MarshalledObject rcmo = transportClient.createMarshalledObject();
rcmo.set(null);
return new SimpleInvocationResult(true, rcmo);
}
}