77 Type[] ts = m.getGenericParameterTypes();
79 if (ts.length > 0)
try {
80 sig = Marshalling.getDBusType(ts);
81 args = Marshalling.convertParameters(args, ts,
conn);
82 }
catch (DBusException DBe) {
83 throw new DBusExecutionException(getString(
"contructDBusTypeFailure") + DBe.getMessage());
87 if (!ro.autostart) flags |= Message.Flags.NO_AUTO_START;
89 if (m.isAnnotationPresent(DBus.Method.NoReply.class)) flags |= Message.Flags.NO_REPLY_EXPECTED;
92 if (m.isAnnotationPresent(DBusMemberName.class))
93 name = m.getAnnotation(DBusMemberName.class).value();
97 call =
new MethodCall(ro.busname, ro.objectpath, null, name, flags, sig, args);
99 if (null != ro.iface.getAnnotation(DBusInterfaceName.class)) {
100 call =
new MethodCall(ro.busname, ro.objectpath, ro.iface.getAnnotation(DBusInterfaceName.class).value(), name, flags, sig, args);
102 call =
new MethodCall(ro.busname, ro.objectpath, AbstractConnection.dollar_pattern.matcher(ro.iface.getName()).replaceAll(
"."), name, flags, sig, args);
104 }
catch (DBusException DBe) {
105 if (AbstractConnection.EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBe);
106 throw new DBusExecutionException(getString(
"constructOutgoingMethodCallFailure") + DBe.getMessage());
108 if (null ==
conn.
outgoing)
throw new NotConnected(getString(
"notConnected"));
110 switch (syncmethod) {
113 return new DBusAsyncReply(call, m,
conn);
116 if (Debug.debug) Debug.print(Debug.VERBOSE,
"Queueing Callback " + callback +
" for " + call);
128 if (m.isAnnotationPresent(DBus.Method.NoReply.class))
return null;
130 Message reply = call.getReply();
131 if (null == reply)
throw new DBus.Error.NoReply(getString(
"notReplyWithSpecifiedTime"));
133 if (reply instanceof Error)
134 ((Error) reply).throwException();
137 return convertRV(reply.getSig(), reply.getParameters(), m,
conn);
138 }
catch (DBusException e) {
139 if (AbstractConnection.EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
140 throw new DBusExecutionException(e.getMessage());
Map< MethodCall, DBusAsyncReply<? extends Object > > pendingCallbackReplys
Definition: AbstractConnection.java:247
Map< MethodCall, CallbackHandler<? extends Object > > pendingCallbacks
Definition: AbstractConnection.java:246
static final int CALL_TYPE_SYNC
Definition: RemoteInvocationHandler.java:30
AbstractConnection conn
Definition: RemoteInvocationHandler.java:144
void queueOutgoing(Message m)
Definition: AbstractConnection.java:481
static Object convertRV(String sig, Object[] rp, Method m, AbstractConnection conn)
Definition: RemoteInvocationHandler.java:34
static final int CALL_TYPE_ASYNC
Definition: RemoteInvocationHandler.java:31
EfficientQueue outgoing
Definition: AbstractConnection.java:252
static final int CALL_TYPE_CALLBACK
Definition: RemoteInvocationHandler.java:32