keycloak-federation
クラス | 公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 限定公開メンバ関数 | 限定公開変数類 | 静的限定公開変数類 | 関数 | 静的関数 | 変数 | 静的変数 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.freedesktop.dbus.AbstractConnection クラスabstract
org.freedesktop.dbus.AbstractConnection の継承関係図
Inheritance graph
org.freedesktop.dbus.AbstractConnection 連携図
Collaboration graph

クラス

class  _globalhandler
 
class  _sender
 
class  _thread
 
class  _workerthread
 
class  FallbackContainer
 

公開メンバ関数

void changeThreadCount (byte newcount)
 
void setWeakReferences (boolean weakreferences)
 
void exportObject (String objectpath, DBusInterface object) throws DBusException
 
void addFallback (String objectprefix, DBusInterface object) throws DBusException
 
void removeFallback (String objectprefix)
 
void unExportObject (String objectpath)
 
void sendSignal (DBusSignal signal)
 
void disconnect ()
 
void finalize ()
 
DBusExecutionException getError ()
 
DBusAsyncReply callMethodAsync (DBusInterface object, String m, Object... parameters)
 
BusAddress getAddress () throws ParseException
 

静的公開メンバ関数

static DBusCallInfo getCallInfo ()
 

静的公開変数類

static final boolean EXCEPTION_DEBUG
 

限定公開メンバ関数

 AbstractConnection (String address) throws DBusException
 
void listen ()
 
abstract< T extends DBusSignal > void removeSigHandler (DBusMatchRule rule, DBusSigHandler< T > handler) throws DBusException
 
abstract< T extends DBusSignal > void addSigHandler (DBusMatchRule rule, DBusSigHandler< T > handler) throws DBusException
 
void sendMessage (Message m)
 

限定公開変数類

Map< String, ExportedObjectexportedObjects
 
Map< DBusInterface, RemoteObjectimportedObjects
 
Map< SignalTuple, Vector< DBusSigHandler<? extends DBusSignal > > > handledSignals
 
EfficientMap pendingCalls
 
Map< MethodCall, CallbackHandler<? extends Object > > pendingCallbacks
 
Map< MethodCall, DBusAsyncReply<? extends Object > > pendingCallbackReplys
 
LinkedList< Runnable > runnables
 
LinkedList< _workerthreadworkers
 
FallbackContainer fallbackcontainer
 
boolean _run
 
_thread thread
 
_sender sender
 
Transport transport
 
String addr
 
boolean weakreferences = false
 
boolean connected = false
 

静的限定公開変数類

static final int TIMEOUT = 100000
 

関数

String getExportedObject (DBusInterface i) throws DBusException
 
abstract DBusInterface getExportedObject (String source, String path) throws DBusException
 
void queueOutgoing (Message m)
 
public< T extends DBusSignal > void removeSigHandler (Class< T > type, DBusSigHandler< T > handler) throws DBusException
 
public< T extends DBusSignal > void removeSigHandler (Class< T > type, DBusInterface object, DBusSigHandler< T > handler) throws DBusException
 
public< T extends DBusSignal > void addSigHandler (Class< T > type, DBusSigHandler< T > handler) throws DBusException
 
public< T extends DBusSignal > void addSigHandler (Class< T > type, DBusInterface object, DBusSigHandler< T > handler) throws DBusException
 
protected< T extends DBusSignal > void addSigHandlerWithoutMatch (Class<? extends DBusSignal > signal, DBusSigHandler< T > handler) throws DBusException
 
public< A > void callWithCallback (DBusInterface object, String m, CallbackHandler< A > callback, Object... parameters)
 

静的関数

 [static initializer]
 

変数

EfficientQueue outgoing
 
LinkedList< ErrorpendingErrors
 

静的変数

static final String BUSNAME_REGEX = "^[-_a-zA-Z][-_a-zA-Z0-9]*(\\.[-_a-zA-Z][-_a-zA-Z0-9]*)*$"
 
static final String CONNID_REGEX = "^:[0-9]*\\.[0-9]*$"
 
static final String OBJECT_REGEX = "^/([-_a-zA-Z0-9]+(/[-_a-zA-Z0-9]+)*)?$"
 
static final byte THREADCOUNT = 4
 
static final int MAX_ARRAY_LENGTH = 67108864
 
static final int MAX_NAME_LENGTH = 255
 
static final Pattern dollar_pattern = Pattern.compile("[$]")
 
static final boolean FLOAT_SUPPORT
 

非公開メンバ関数

void addRunnable (Runnable r)
 
void handleMessage (final MethodCall m) throws DBusException
 
void handleMessage (final DBusSignal s)
 
void handleMessage (final Error err)
 
void handleMessage (final MethodReturn mr)
 
Message readIncoming () throws DBusException
 

非公開変数類

ObjectTree objectTree
 
_globalhandler _globalhandlerreference
 

静的非公開変数類

static final int PENDING_MAP_INITIAL_SIZE = 10
 
static final Map< Thread, DBusCallInfoinfomap = new HashMap<Thread, DBusCallInfo>()
 

詳解

Handles a connection to DBus.

構築子と解体子

◆ AbstractConnection()

org.freedesktop.dbus.AbstractConnection.AbstractConnection ( String  address) throws DBusException
inlineprotected
289  {
290  exportedObjects = new HashMap<String, ExportedObject>();
291  importedObjects = new HashMap<DBusInterface, RemoteObject>();
292  _globalhandlerreference = new _globalhandler();
293  synchronized (exportedObjects) {
294  exportedObjects.put(null, new ExportedObject(_globalhandlerreference, weakreferences));
295  }
296  handledSignals = new HashMap<SignalTuple, Vector<DBusSigHandler<? extends DBusSignal>>>();
297  pendingCalls = new EfficientMap(PENDING_MAP_INITIAL_SIZE);
298  outgoing = new EfficientQueue(PENDING_MAP_INITIAL_SIZE);
299  pendingCallbacks = new HashMap<MethodCall, CallbackHandler<? extends Object>>();
300  pendingCallbackReplys = new HashMap<MethodCall, DBusAsyncReply<? extends Object>>();
301  pendingErrors = new LinkedList<Error>();
302  runnables = new LinkedList<Runnable>();
303  workers = new LinkedList<_workerthread>();
304  objectTree = new ObjectTree();
305  fallbackcontainer = new FallbackContainer();
306  synchronized (workers) {
307  for (int i = 0; i < THREADCOUNT; i++) {
308  _workerthread t = new _workerthread();
309  t.start();
310  workers.add(t);
311  }
312  }
313  _run = true;
314  addr = address;
315  }
Map< MethodCall, DBusAsyncReply<? extends Object > > pendingCallbackReplys
Definition: AbstractConnection.java:247
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
static final int PENDING_MAP_INITIAL_SIZE
Definition: AbstractConnection.java:233
LinkedList< Runnable > runnables
Definition: AbstractConnection.java:248
String addr
Definition: AbstractConnection.java:258
Map< MethodCall, CallbackHandler<? extends Object > > pendingCallbacks
Definition: AbstractConnection.java:246
Map< String, ExportedObject > exportedObjects
Definition: AbstractConnection.java:240
_globalhandler _globalhandlerreference
Definition: AbstractConnection.java:242
FallbackContainer fallbackcontainer
Definition: AbstractConnection.java:250
static final byte THREADCOUNT
Definition: AbstractConnection.java:237
boolean _run
Definition: AbstractConnection.java:251
EfficientQueue outgoing
Definition: AbstractConnection.java:252
Map< SignalTuple, Vector< DBusSigHandler<? extends DBusSignal > > > handledSignals
Definition: AbstractConnection.java:244
EfficientMap pendingCalls
Definition: AbstractConnection.java:245
LinkedList< Error > pendingErrors
Definition: AbstractConnection.java:253
LinkedList< _workerthread > workers
Definition: AbstractConnection.java:249
boolean weakreferences
Definition: AbstractConnection.java:259
ObjectTree objectTree
Definition: AbstractConnection.java:241

関数詳解

◆ [static initializer]()

org.freedesktop.dbus.AbstractConnection.[static initializer] ( )
inlinestaticpackage

◆ addFallback()

void org.freedesktop.dbus.AbstractConnection.addFallback ( String  objectprefix,
DBusInterface  object 
) throws DBusException
inline

Export an object as a fallback object. This object will have it's methods invoked for all paths starting with this object path.

引数
objectprefixThe path below which the fallback handles calls. MUST be in slash-notation, like "/org/freedesktop/Local",
objectThe object to export.
例外
DBusExceptionIf the objectpath is incorrectly formatted,
429  {
430  if (null == objectprefix || "".equals(objectprefix))
431  throw new DBusException(getString("missingObjectPath"));
432  if (!objectprefix.matches(OBJECT_REGEX) || objectprefix.length() > MAX_NAME_LENGTH)
433  throw new DBusException(getString("invalidObjectPath") + objectprefix);
434  ExportedObject eo = new ExportedObject(object, weakreferences);
435  fallbackcontainer.add(objectprefix, eo);
436  }
synchronized void add(String path, ExportedObject eo)
Definition: AbstractConnection.java:46
static final int MAX_NAME_LENGTH
Definition: AbstractConnection.java:239
FallbackContainer fallbackcontainer
Definition: AbstractConnection.java:250
static final String OBJECT_REGEX
Definition: AbstractConnection.java:236
boolean weakreferences
Definition: AbstractConnection.java:259

◆ addRunnable()

void org.freedesktop.dbus.AbstractConnection.addRunnable ( Runnable  r)
inlineprivate
350  {
351  synchronized (runnables) {
352  runnables.add(r);
353  runnables.notifyAll();
354  }
355  }
LinkedList< Runnable > runnables
Definition: AbstractConnection.java:248

◆ addSigHandler() [1/3]

public<T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.addSigHandler ( Class< T >  type,
DBusSigHandler< T >  handler 
) throws DBusException
inlinepackage

Add a Signal Handler. Adds a signal handler to call when a signal is received which matches the specified type and name.

引数
typeThe signal to watch for.
handlerThe handler to call when a signal is received.
例外
DBusExceptionIf listening for the signal on the bus failed.
ClassCastExceptionIf type is not a sub-type of DBusSignal.
532  {
533  if (!DBusSignal.class.isAssignableFrom(type)) throw new ClassCastException(getString("notDBusSignal"));
534  addSigHandler(new DBusMatchRule(type), (DBusSigHandler<? extends DBusSignal>) handler);
535  }
public< T extends DBusSignal > void addSigHandler(Class< T > type, DBusSigHandler< T > handler)
Definition: AbstractConnection.java:532

◆ addSigHandler() [2/3]

public<T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.addSigHandler ( Class< T >  type,
DBusInterface  object,
DBusSigHandler< T >  handler 
) throws DBusException
inlinepackage

Add a Signal Handler. Adds a signal handler to call when a signal is received which matches the specified type, name and object.

引数
typeThe signal to watch for.
objectThe object from which the signal will be emitted
handlerThe handler to call when a signal is received.
例外
DBusExceptionIf listening for the signal on the bus failed.
ClassCastExceptionIf type is not a sub-type of DBusSignal.
548  {
549  if (!DBusSignal.class.isAssignableFrom(type)) throw new ClassCastException(getString("notDBusSignal"));
550  String objectpath = importedObjects.get(object).objectpath;
551  if (!objectpath.matches(OBJECT_REGEX) || objectpath.length() > MAX_NAME_LENGTH)
552  throw new DBusException(getString("invalidObjectPath") + objectpath);
553  addSigHandler(new DBusMatchRule(type, null, objectpath), (DBusSigHandler<? extends DBusSignal>) handler);
554  }
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
static final int MAX_NAME_LENGTH
Definition: AbstractConnection.java:239
public< T extends DBusSignal > void addSigHandler(Class< T > type, DBusSigHandler< T > handler)
Definition: AbstractConnection.java:532
static final String OBJECT_REGEX
Definition: AbstractConnection.java:236

◆ addSigHandler() [3/3]

abstract <T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.addSigHandler ( DBusMatchRule  rule,
DBusSigHandler< T >  handler 
) throws DBusException
abstractprotected

◆ addSigHandlerWithoutMatch()

protected<T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.addSigHandlerWithoutMatch ( Class<? extends DBusSignal signal,
DBusSigHandler< T >  handler 
) throws DBusException
inlinepackage
558  {
559  DBusMatchRule rule = new DBusMatchRule(signal);
560  SignalTuple key = new SignalTuple(rule.getInterface(), rule.getMember(), rule.getObject(), rule.getSource());
561  synchronized (handledSignals) {
562  Vector<DBusSigHandler<? extends DBusSignal>> v = handledSignals.get(key);
563  if (null == v) {
564  v = new Vector<DBusSigHandler<? extends DBusSignal>>();
565  v.add(handler);
566  handledSignals.put(key, v);
567  } else
568  v.add(handler);
569  }
570  }
Map< SignalTuple, Vector< DBusSigHandler<? extends DBusSignal > > > handledSignals
Definition: AbstractConnection.java:244

◆ callMethodAsync()

DBusAsyncReply org.freedesktop.dbus.AbstractConnection.callMethodAsync ( DBusInterface  object,
String  m,
Object...  parameters 
)
inline

Call a method asynchronously and get a handle with which to get the reply.

引数
objectThe remote object on which to call the method.
mThe name of the method on the interface to call.
parametersThe parameters to call the method with.
戻り値
A handle to the call.
680  {
681  Class<?>[] types = new Class[parameters.length];
682  for (int i = 0; i < parameters.length; i++)
683  types[i] = parameters[i].getClass();
684  RemoteObject ro = importedObjects.get(object);
685 
686  try {
687  Method me;
688  if (null == ro.iface)
689  me = object.getClass().getMethod(m, types);
690  else
691  me = ro.iface.getMethod(m, types);
692  return (DBusAsyncReply) RemoteInvocationHandler.executeRemoteMethod(ro, me, this, RemoteInvocationHandler.CALL_TYPE_ASYNC, null, parameters);
693  } catch (DBusExecutionException DBEe) {
694  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBEe);
695  throw DBEe;
696  } catch (Exception e) {
697  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
698  throw new DBusExecutionException(e.getMessage());
699  }
700  }
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261

◆ callWithCallback()

public<A> void org.freedesktop.dbus.AbstractConnection.callWithCallback ( DBusInterface  object,
String  m,
CallbackHandler< A >  callback,
Object...  parameters 
)
inlinepackage

Call a method asynchronously and set a callback. This handler will be called in a separate thread.

引数
objectThe remote object on which to call the method.
mThe name of the method on the interface to call.
callbackThe callback handler.
parametersThe parameters to call the method with.
648  {
649  if (Debug.debug) Debug.print(Debug.VERBOSE, "callWithCallback(" + object + "," + m + ", " + callback);
650  Class[] types = new Class[parameters.length];
651  for (int i = 0; i < parameters.length; i++)
652  types[i] = parameters[i].getClass();
653  RemoteObject ro = importedObjects.get(object);
654 
655  try {
656  Method me;
657  if (null == ro.iface)
658  me = object.getClass().getMethod(m, types);
659  else
660  me = ro.iface.getMethod(m, types);
661  RemoteInvocationHandler.executeRemoteMethod(ro, me, this, RemoteInvocationHandler.CALL_TYPE_CALLBACK, callback, parameters);
662  } catch (DBusExecutionException DBEe) {
663  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBEe);
664  throw DBEe;
665  } catch (Exception e) {
666  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
667  throw new DBusExecutionException(e.getMessage());
668  }
669  }
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261

◆ changeThreadCount()

void org.freedesktop.dbus.AbstractConnection.changeThreadCount ( byte  newcount)
inline

Change the number of worker threads to receive method calls and handle signals. Default is 4 threads

引数
newcountThe new number of worker Threads to use.
331  {
332  synchronized (workers) {
333  if (workers.size() > newcount) {
334  int n = workers.size() - newcount;
335  for (int i = 0; i < n; i++) {
336  _workerthread t = workers.removeFirst();
337  t.halt();
338  }
339  } else if (workers.size() < newcount) {
340  int n = newcount - workers.size();
341  for (int i = 0; i < n; i++) {
342  _workerthread t = new _workerthread();
343  t.start();
344  workers.add(t);
345  }
346  }
347  }
348  }
LinkedList< _workerthread > workers
Definition: AbstractConnection.java:249

◆ disconnect()

void org.freedesktop.dbus.AbstractConnection.disconnect ( )
inline

Disconnect from the Bus.

575  {
576  connected = false;
577  if (Debug.debug) Debug.print(Debug.INFO, "Sending disconnected signal");
578  try {
580  } catch (Exception ee) {
581  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, ee);
582  }
583 
584  if (Debug.debug) Debug.print(Debug.INFO, "Disconnecting Abstract Connection");
585  // run all pending tasks.
586  while (runnables.size() > 0)
587  synchronized (runnables) {
588  runnables.notifyAll();
589  }
590 
591  // stop the main thread
592  _run = false;
593 
594  // unblock the sending thread.
595  synchronized (outgoing) {
596  outgoing.notifyAll();
597  }
598 
599  // disconnect from the trasport layer
600  try {
601  if (null != transport) {
603  transport = null;
604  }
605  } catch (IOException IOe) {
606  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, IOe);
607  }
608 
609  // stop all the workers
610  synchronized (workers) {
611  for (_workerthread t : workers)
612  t.halt();
613  }
614 
615  // make sure none are blocking on the runnables queue still
616  synchronized (runnables) {
617  runnables.notifyAll();
618  }
619  }
Transport transport
Definition: AbstractConnection.java:257
LinkedList< Runnable > runnables
Definition: AbstractConnection.java:248
Definition: DBus.java:32
void handleMessage(final MethodCall m)
Definition: AbstractConnection.java:702
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
boolean _run
Definition: AbstractConnection.java:251
Definition: DBus.java:102
void disconnect()
Definition: Transport.java:828
EfficientQueue outgoing
Definition: AbstractConnection.java:252
boolean connected
Definition: AbstractConnection.java:263
LinkedList< _workerthread > workers
Definition: AbstractConnection.java:249

◆ exportObject()

void org.freedesktop.dbus.AbstractConnection.exportObject ( String  objectpath,
DBusInterface  object 
) throws DBusException
inline

Export an object so that its methods can be called on DBus.

引数
objectpathThe path to the object we are exposing. MUST be in slash-notation, like "/org/freedesktop/Local", and SHOULD end with a capitalised term. Only one object may be exposed on each path at any one time, but an object may be exposed on several paths at once.
objectThe object to export.
例外
DBusExceptionIf the objectpath is already exporting an object. or if objectpath is incorrectly formatted,
405  {
406  if (null == objectpath || "".equals(objectpath))
407  throw new DBusException(getString("missingObjectPath"));
408  if (!objectpath.matches(OBJECT_REGEX) || objectpath.length() > MAX_NAME_LENGTH)
409  throw new DBusException(getString("invalidObjectPath") + objectpath);
410  synchronized (exportedObjects) {
411  if (null != exportedObjects.get(objectpath))
412  throw new DBusException(getString("objectAlreadyExported"));
413  ExportedObject eo = new ExportedObject(object, weakreferences);
414  exportedObjects.put(objectpath, eo);
415  objectTree.add(objectpath, eo, eo.introspectiondata);
416  }
417  }
void add(String path, ExportedObject object, String data)
Definition: ObjectTree.java:110
Map< String, ExportedObject > exportedObjects
Definition: AbstractConnection.java:240
static final int MAX_NAME_LENGTH
Definition: AbstractConnection.java:239
static final String OBJECT_REGEX
Definition: AbstractConnection.java:236
boolean weakreferences
Definition: AbstractConnection.java:259
ObjectTree objectTree
Definition: AbstractConnection.java:241

◆ finalize()

void org.freedesktop.dbus.AbstractConnection.finalize ( )
inline
621  {
622  disconnect();
623  }
void disconnect()
Definition: AbstractConnection.java:575

◆ getAddress()

BusAddress org.freedesktop.dbus.AbstractConnection.getAddress ( ) throws ParseException
inline

Returns the address this connection is connected to.

1056  {
1057  return new BusAddress(addr);
1058  }
String addr
Definition: AbstractConnection.java:258

◆ getCallInfo()

static DBusCallInfo org.freedesktop.dbus.AbstractConnection.getCallInfo ( )
inlinestatic

Returns a structure with information on the current method call.

戻り値
the DBusCallInfo for this method call, or null if we are not in a method call.
377  {
378  DBusCallInfo info;
379  synchronized (infomap) {
380  info = infomap.get(Thread.currentThread());
381  }
382  return info;
383  }
static final Map< Thread, DBusCallInfo > infomap
Definition: AbstractConnection.java:254

◆ getError()

DBusExecutionException org.freedesktop.dbus.AbstractConnection.getError ( )
inline

Return any DBus error which has been received.

戻り値
A DBusExecutionException, or null if no error is pending.
630  {
631  synchronized (pendingErrors) {
632  if (pendingErrors.size() == 0) return null;
633  else
634  return pendingErrors.removeFirst().getException();
635  }
636  }
LinkedList< Error > pendingErrors
Definition: AbstractConnection.java:253

◆ getExportedObject() [1/2]

String org.freedesktop.dbus.AbstractConnection.getExportedObject ( DBusInterface  i) throws DBusException
inlinepackage
357  {
358  synchronized (exportedObjects) {
359  for (String s : exportedObjects.keySet())
360  if (i.equals(exportedObjects.get(s).object.get()))
361  return s;
362  }
363 
364  String s = importedObjects.get(i).objectpath;
365  if (null != s) return s;
366 
367  throw new DBusException("Not an object exported or imported by this connection");
368  }
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
Map< String, ExportedObject > exportedObjects
Definition: AbstractConnection.java:240

◆ getExportedObject() [2/2]

abstract DBusInterface org.freedesktop.dbus.AbstractConnection.getExportedObject ( String  source,
String  path 
) throws DBusException
abstractpackage

◆ handleMessage() [1/4]

void org.freedesktop.dbus.AbstractConnection.handleMessage ( final MethodCall  m) throws DBusException
inlineprivate
702  {
703  if (Debug.debug) Debug.print(Debug.DEBUG, "Handling incoming method call: " + m);
704 
705  ExportedObject eo = null;
706  Method meth = null;
707  Object o = null;
708 
709  if (null == m.getInterface() ||
710  m.getInterface().equals("org.freedesktop.DBus.Peer") ||
711  m.getInterface().equals("org.freedesktop.DBus.Introspectable")) {
712  synchronized (exportedObjects) {
713  eo = exportedObjects.get(null);
714  }
715  if (null != eo && null == eo.object.get()) {
716  unExportObject(null);
717  eo = null;
718  }
719  if (null != eo) {
720  meth = eo.methods.get(new MethodTuple(m.getName(), m.getSig()));
721  }
722  if (null != meth)
723  o = new _globalhandler(m.getPath());
724  else
725  eo = null;
726  }
727  if (null == o) {
728  // now check for specific exported functions
729 
730  synchronized (exportedObjects) {
731  eo = exportedObjects.get(m.getPath());
732  }
733  if (null != eo && null == eo.object.get()) {
734  if (Debug.debug) Debug.print(Debug.INFO, "Unexporting " + m.getPath() + " implicitly");
735  unExportObject(m.getPath());
736  eo = null;
737  }
738 
739  if (null == eo) {
740  eo = fallbackcontainer.get(m.getPath());
741  }
742 
743  if (null == eo) {
744  try {
745  queueOutgoing(new Error(m, new DBus.Error.UnknownObject(m.getPath() + getString("notObjectProvidedByProcess"))));
746  } catch (DBusException DBe) {
747  }
748  return;
749  }
750  if (Debug.debug) {
751  Debug.print(Debug.VERBOSE, "Searching for method " + m.getName() + " with signature " + m.getSig());
752  Debug.print(Debug.VERBOSE, "List of methods on " + eo + ":");
753  for (MethodTuple mt : eo.methods.keySet())
754  Debug.print(Debug.VERBOSE, " " + mt + " => " + eo.methods.get(mt));
755  }
756  meth = eo.methods.get(new MethodTuple(m.getName(), m.getSig()));
757  if (null == meth) {
758  try {
759  queueOutgoing(new Error(m, new DBus.Error.UnknownMethod(MessageFormat.format(getString("methodDoesNotExist"), new Object[]{m.getInterface(), m.getName()}))));
760  } catch (DBusException DBe) {
761  }
762  return;
763  }
764  o = eo.object.get();
765  }
766 
767  // now execute it
768  final Method me = meth;
769  final Object ob = o;
770  final boolean noreply = (1 == (m.getFlags() & Message.Flags.NO_REPLY_EXPECTED));
771  final DBusCallInfo info = new DBusCallInfo(m);
772  final AbstractConnection conn = this;
773  if (Debug.debug) Debug.print(Debug.VERBOSE, "Adding Runnable for method " + meth);
774  addRunnable(new Runnable() {
775  private boolean run = false;
776 
777  public synchronized void run() {
778  if (run) return;
779  run = true;
780  if (Debug.debug) Debug.print(Debug.DEBUG, "Running method " + me + " for remote call");
781  try {
782  Type[] ts = me.getGenericParameterTypes();
783  m.setArgs(Marshalling.deSerializeParameters(m.getParameters(), ts, conn));
784  if (Debug.debug)
785  Debug.print(Debug.VERBOSE, "Deserialised " + Arrays.deepToString(m.getParameters()) + " to types " + Arrays.deepToString(ts));
786  } catch (Exception e) {
787  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
788  try {
789  conn.queueOutgoing(new Error(m, new DBus.Error.UnknownMethod(getString("deSerializationFailure") + e)));
790  } catch (DBusException DBe) {
791  }
792  return;
793  }
794 
795  try {
796  synchronized (infomap) {
797  infomap.put(Thread.currentThread(), info);
798  }
799  Object result;
800  try {
801  if (Debug.debug)
802  Debug.print(Debug.VERBOSE, "Invoking Method: " + me + " on " + ob + " with parameters " + Arrays.deepToString(m.getParameters()));
803  result = me.invoke(ob, m.getParameters());
804  } catch (InvocationTargetException ITe) {
805  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, ITe.getCause());
806  throw ITe.getCause();
807  }
808  synchronized (infomap) {
809  infomap.remove(Thread.currentThread());
810  }
811  if (!noreply) {
812  MethodReturn reply;
813  if (Void.TYPE.equals(me.getReturnType()))
814  reply = new MethodReturn(m, null);
815  else {
816  StringBuffer sb = new StringBuffer();
817  for (String s : Marshalling.getDBusType(me.getGenericReturnType()))
818  sb.append(s);
819  Object[] nr = Marshalling.convertParameters(new Object[]{result}, new Type[]{me.getGenericReturnType()}, conn);
820 
821  reply = new MethodReturn(m, sb.toString(), nr);
822  }
823  conn.queueOutgoing(reply);
824  }
825  } catch (DBusExecutionException DBEe) {
826  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBEe);
827  try {
828  conn.queueOutgoing(new Error(m, DBEe));
829  } catch (DBusException DBe) {
830  }
831  } catch (Throwable e) {
832  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
833  try {
834  conn.queueOutgoing(new Error(m, new DBusExecutionException(MessageFormat.format(getString("errorExecutingMethod"), new Object[]{m.getInterface(), m.getName(), e.getMessage()}))));
835  } catch (DBusException DBe) {
836  }
837  }
838  }
839  });
840  }
void addRunnable(Runnable r)
Definition: AbstractConnection.java:350
void unExportObject(String objectpath)
Definition: AbstractConnection.java:452
synchronized ExportedObject get(String path)
Definition: AbstractConnection.java:56
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
Map< String, ExportedObject > exportedObjects
Definition: AbstractConnection.java:240
void queueOutgoing(Message m)
Definition: AbstractConnection.java:481
FallbackContainer fallbackcontainer
Definition: AbstractConnection.java:250
static final Map< Thread, DBusCallInfo > infomap
Definition: AbstractConnection.java:254
AbstractConnection(String address)
Definition: AbstractConnection.java:289

◆ handleMessage() [2/4]

void org.freedesktop.dbus.AbstractConnection.handleMessage ( final DBusSignal  s)
inlineprivate
843  {
844  if (Debug.debug) Debug.print(Debug.DEBUG, "Handling incoming signal: " + s);
845  Vector<DBusSigHandler<? extends DBusSignal>> v = new Vector<DBusSigHandler<? extends DBusSignal>>();
846  synchronized (handledSignals) {
847  Vector<DBusSigHandler<? extends DBusSignal>> t;
848  t = handledSignals.get(new SignalTuple(s.getInterface(), s.getName(), null, null));
849  if (null != t) v.addAll(t);
850  t = handledSignals.get(new SignalTuple(s.getInterface(), s.getName(), s.getPath(), null));
851  if (null != t) v.addAll(t);
852  t = handledSignals.get(new SignalTuple(s.getInterface(), s.getName(), null, s.getSource()));
853  if (null != t) v.addAll(t);
854  t = handledSignals.get(new SignalTuple(s.getInterface(), s.getName(), s.getPath(), s.getSource()));
855  if (null != t) v.addAll(t);
856  }
857  if (0 == v.size()) return;
858  final AbstractConnection conn = this;
859  for (final DBusSigHandler<? extends DBusSignal> h : v) {
860  if (Debug.debug) Debug.print(Debug.VERBOSE, "Adding Runnable for signal " + s + " with handler " + h);
861  addRunnable(new Runnable() {
862  private boolean run = false;
863 
864  public synchronized void run() {
865  if (run) return;
866  run = true;
867  try {
868  DBusSignal rs;
869  if (s instanceof DBusSignal.internalsig || s.getClass().equals(DBusSignal.class))
870  rs = s.createReal(conn);
871  else
872  rs = s;
873  ((DBusSigHandler<DBusSignal>) h).handle(rs);
874  } catch (DBusException DBe) {
875  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBe);
876  try {
877  conn.queueOutgoing(new Error(s, new DBusExecutionException("Error handling signal " + s.getInterface() + "." + s.getName() + ": " + DBe.getMessage())));
878  } catch (DBusException DBe2) {
879  }
880  }
881  }
882  });
883  }
884  }
void addRunnable(Runnable r)
Definition: AbstractConnection.java:350
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
Map< SignalTuple, Vector< DBusSigHandler<? extends DBusSignal > > > handledSignals
Definition: AbstractConnection.java:244
AbstractConnection(String address)
Definition: AbstractConnection.java:289

◆ handleMessage() [3/4]

void org.freedesktop.dbus.AbstractConnection.handleMessage ( final Error  err)
inlineprivate
886  {
887  if (Debug.debug) Debug.print(Debug.DEBUG, "Handling incoming error: " + err);
888  MethodCall m = null;
889  if (null == pendingCalls) return;
890  synchronized (pendingCalls) {
891  if (pendingCalls.contains(err.getReplySerial()))
892  m = pendingCalls.remove(err.getReplySerial());
893  }
894  if (null != m) {
895  m.setReply(err);
896  CallbackHandler cbh = null;
897  DBusAsyncReply asr = null;
898  synchronized (pendingCallbacks) {
899  cbh = pendingCallbacks.remove(m);
900  if (Debug.debug) Debug.print(Debug.VERBOSE, cbh + " = pendingCallbacks.remove(" + m + ")");
901  asr = pendingCallbackReplys.remove(m);
902  }
903  // queue callback for execution
904  if (null != cbh) {
905  final CallbackHandler fcbh = cbh;
906  if (Debug.debug) Debug.print(Debug.VERBOSE, "Adding Error Runnable with callback handler " + fcbh);
907  addRunnable(new Runnable() {
908  private boolean run = false;
909 
910  public synchronized void run() {
911  if (run) return;
912  run = true;
913  try {
914  if (Debug.debug) Debug.print(Debug.VERBOSE, "Running Error Callback for " + err);
915  DBusCallInfo info = new DBusCallInfo(err);
916  synchronized (infomap) {
917  infomap.put(Thread.currentThread(), info);
918  }
919 
920  fcbh.handleError(err.getException());
921  synchronized (infomap) {
922  infomap.remove(Thread.currentThread());
923  }
924 
925  } catch (Exception e) {
926  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
927  }
928  }
929  });
930  }
931 
932  } else
933  synchronized (pendingErrors) {
934  pendingErrors.addLast(err);
935  }
936  }
void addRunnable(Runnable r)
Definition: AbstractConnection.java:350
Map< MethodCall, DBusAsyncReply<? extends Object > > pendingCallbackReplys
Definition: AbstractConnection.java:247
MethodCall remove(long l)
Definition: EfficientMap.java:85
Map< MethodCall, CallbackHandler<? extends Object > > pendingCallbacks
Definition: AbstractConnection.java:246
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
static final Map< Thread, DBusCallInfo > infomap
Definition: AbstractConnection.java:254
synchronized void setReply(Message reply)
Definition: MethodCall.java:131
EfficientMap pendingCalls
Definition: AbstractConnection.java:245
LinkedList< Error > pendingErrors
Definition: AbstractConnection.java:253
boolean contains(long l)
Definition: EfficientMap.java:108

◆ handleMessage() [4/4]

void org.freedesktop.dbus.AbstractConnection.handleMessage ( final MethodReturn  mr)
inlineprivate
939  {
940  if (Debug.debug) Debug.print(Debug.DEBUG, "Handling incoming method return: " + mr);
941  MethodCall m = null;
942  if (null == pendingCalls) return;
943  synchronized (pendingCalls) {
944  if (pendingCalls.contains(mr.getReplySerial()))
945  m = pendingCalls.remove(mr.getReplySerial());
946  }
947  if (null != m) {
948  m.setReply(mr);
949  mr.setCall(m);
950  CallbackHandler cbh = null;
951  DBusAsyncReply asr = null;
952  synchronized (pendingCallbacks) {
953  cbh = pendingCallbacks.remove(m);
954  if (Debug.debug) Debug.print(Debug.VERBOSE, cbh + " = pendingCallbacks.remove(" + m + ")");
955  asr = pendingCallbackReplys.remove(m);
956  }
957  // queue callback for execution
958  if (null != cbh) {
959  final CallbackHandler fcbh = cbh;
960  final DBusAsyncReply fasr = asr;
961  if (Debug.debug)
962  Debug.print(Debug.VERBOSE, "Adding Runnable for method " + fasr.getMethod() + " with callback handler " + fcbh);
963  addRunnable(new Runnable() {
964  private boolean run = false;
965 
966  public synchronized void run() {
967  if (run) return;
968  run = true;
969  try {
970  if (Debug.debug) Debug.print(Debug.VERBOSE, "Running Callback for " + mr);
971  DBusCallInfo info = new DBusCallInfo(mr);
972  synchronized (infomap) {
973  infomap.put(Thread.currentThread(), info);
974  }
975 
976  fcbh.handle(RemoteInvocationHandler.convertRV(mr.getSig(), mr.getParameters(), fasr.getMethod(), fasr.getConnection()));
977  synchronized (infomap) {
978  infomap.remove(Thread.currentThread());
979  }
980 
981  } catch (Exception e) {
982  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
983  }
984  }
985  });
986  }
987 
988  } else
989  try {
990  queueOutgoing(new Error(mr, new DBusExecutionException(getString("spuriousReply"))));
991  } catch (DBusException DBe) {
992  }
993  }
void addRunnable(Runnable r)
Definition: AbstractConnection.java:350
Map< MethodCall, DBusAsyncReply<? extends Object > > pendingCallbackReplys
Definition: AbstractConnection.java:247
MethodCall remove(long l)
Definition: EfficientMap.java:85
Map< MethodCall, CallbackHandler<? extends Object > > pendingCallbacks
Definition: AbstractConnection.java:246
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
void queueOutgoing(Message m)
Definition: AbstractConnection.java:481
static final Map< Thread, DBusCallInfo > infomap
Definition: AbstractConnection.java:254
synchronized void setReply(Message reply)
Definition: MethodCall.java:131
EfficientMap pendingCalls
Definition: AbstractConnection.java:245
boolean contains(long l)
Definition: EfficientMap.java:108

◆ listen()

void org.freedesktop.dbus.AbstractConnection.listen ( )
inlineprotected
317  {
318  // start listening
319  thread = new _thread();
320  thread.start();
321  sender = new _sender();
322  sender.start();
323  }
_sender sender
Definition: AbstractConnection.java:256
_thread thread
Definition: AbstractConnection.java:255

◆ queueOutgoing()

void org.freedesktop.dbus.AbstractConnection.queueOutgoing ( Message  m)
inlinepackage
481  {
482  synchronized (outgoing) {
483  if (null == outgoing) return;
484  outgoing.add(m);
485  if (Debug.debug) Debug.print(Debug.DEBUG, "Notifying outgoing thread");
486  outgoing.notifyAll();
487  }
488  }
void add(Message m)
Definition: EfficientQueue.java:73
EfficientQueue outgoing
Definition: AbstractConnection.java:252

◆ readIncoming()

Message org.freedesktop.dbus.AbstractConnection.readIncoming ( ) throws DBusException
inlineprivate
1042  {
1043  if (!connected) throw new NotConnected(getString("missingTransport"));
1044  Message m = null;
1045  try {
1046  m = transport.min.readMessage();
1047  } catch (IOException IOe) {
1048  throw new FatalDBusException(IOe.getMessage());
1049  }
1050  return m;
1051  }
MessageReader min
Definition: Transport.java:734
Transport transport
Definition: AbstractConnection.java:257
Message readMessage()
Definition: MessageReader.java:40
boolean connected
Definition: AbstractConnection.java:263

◆ removeFallback()

void org.freedesktop.dbus.AbstractConnection.removeFallback ( String  objectprefix)
inline

Remove a fallback

引数
objectprefixThe prefix to remove the fallback for.
443  {
444  fallbackcontainer.remove(objectprefix);
445  }
FallbackContainer fallbackcontainer
Definition: AbstractConnection.java:250
synchronized void remove(String path)
Definition: AbstractConnection.java:51

◆ removeSigHandler() [1/3]

public<T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.removeSigHandler ( Class< T >  type,
DBusSigHandler< T >  handler 
) throws DBusException
inlinepackage

Remove a Signal Handler. Stops listening for this signal.

引数
typeThe signal to watch for.
例外
DBusExceptionIf listening for the signal on the bus failed.
ClassCastExceptionIf type is not a sub-type of DBusSignal.
498  {
499  if (!DBusSignal.class.isAssignableFrom(type)) throw new ClassCastException(getString("notDBusSignal"));
500  removeSigHandler(new DBusMatchRule(type), handler);
501  }
public< T extends DBusSignal > void removeSigHandler(Class< T > type, DBusSigHandler< T > handler)
Definition: AbstractConnection.java:498

◆ removeSigHandler() [2/3]

public<T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.removeSigHandler ( Class< T >  type,
DBusInterface  object,
DBusSigHandler< T >  handler 
) throws DBusException
inlinepackage

Remove a Signal Handler. Stops listening for this signal.

引数
typeThe signal to watch for.
objectThe object emitting the signal.
例外
DBusExceptionIf listening for the signal on the bus failed.
ClassCastExceptionIf type is not a sub-type of DBusSignal.
512  {
513  if (!DBusSignal.class.isAssignableFrom(type)) throw new ClassCastException(getString("notDBusSignal"));
514  String objectpath = importedObjects.get(object).objectpath;
515  if (!objectpath.matches(OBJECT_REGEX) || objectpath.length() > MAX_NAME_LENGTH)
516  throw new DBusException(getString("invalidObjectPath") + objectpath);
517  removeSigHandler(new DBusMatchRule(type, null, objectpath), handler);
518  }
Map< DBusInterface, RemoteObject > importedObjects
Definition: AbstractConnection.java:243
static final int MAX_NAME_LENGTH
Definition: AbstractConnection.java:239
static final String OBJECT_REGEX
Definition: AbstractConnection.java:236
public< T extends DBusSignal > void removeSigHandler(Class< T > type, DBusSigHandler< T > handler)
Definition: AbstractConnection.java:498

◆ removeSigHandler() [3/3]

abstract <T extends DBusSignal> void org.freedesktop.dbus.AbstractConnection.removeSigHandler ( DBusMatchRule  rule,
DBusSigHandler< T >  handler 
) throws DBusException
abstractprotected

◆ sendMessage()

void org.freedesktop.dbus.AbstractConnection.sendMessage ( Message  m)
inlineprotected
995  {
996  try {
997  if (!connected) throw new NotConnected(getString("disconnected"));
998  if (m instanceof DBusSignal)
999  ((DBusSignal) m).appendbody(this);
1000 
1001  if (m instanceof MethodCall) {
1002  if (0 == (m.getFlags() & Message.Flags.NO_REPLY_EXPECTED))
1003  if (null == pendingCalls)
1004  ((MethodCall) m).setReply(new Error("org.freedesktop.DBus.Local", "org.freedesktop.DBus.Local.disconnected", 0, "s", new Object[]{getString("disconnected")}));
1005  else synchronized (pendingCalls) {
1006  pendingCalls.put(m.getSerial(), (MethodCall) m);
1007  }
1008  }
1009 
1011 
1012  } catch (Exception e) {
1013  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
1014  if (m instanceof MethodCall && e instanceof NotConnected)
1015  try {
1016  ((MethodCall) m).setReply(new Error("org.freedesktop.DBus.Local", "org.freedesktop.DBus.Local.disconnected", 0, "s", new Object[]{getString("disconnected")}));
1017  } catch (DBusException DBe) {
1018  }
1019  if (m instanceof MethodCall && e instanceof DBusExecutionException)
1020  try {
1021  ((MethodCall) m).setReply(new Error(m, e));
1022  } catch (DBusException DBe) {
1023  }
1024  else if (m instanceof MethodCall)
1025  try {
1026  if (Debug.debug) Debug.print(Debug.INFO, "Setting reply to " + m + " as an error");
1027  ((MethodCall) m).setReply(new Error(m, new DBusExecutionException(getString("messageFailedSend") + e.getMessage())));
1028  } catch (DBusException DBe) {
1029  }
1030  else if (m instanceof MethodReturn)
1031  try {
1032  transport.mout.writeMessage(new Error(m, e));
1033  } catch (IOException IOe) {
1034  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, IOe);
1035  } catch (DBusException IOe) {
1036  if (EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, e);
1037  }
1038  if (e instanceof IOException) disconnect();
1039  }
1040  }
void disconnect()
Definition: AbstractConnection.java:575
Transport transport
Definition: AbstractConnection.java:257
void put(long l, MethodCall m)
Definition: EfficientMap.java:74
static final boolean EXCEPTION_DEBUG
Definition: AbstractConnection.java:261
MessageWriter mout
Definition: Transport.java:735
EfficientMap pendingCalls
Definition: AbstractConnection.java:245
boolean connected
Definition: AbstractConnection.java:263
void writeMessage(Message m)
Definition: MessageWriter.java:37

◆ sendSignal()

void org.freedesktop.dbus.AbstractConnection.sendSignal ( DBusSignal  signal)
inline

Return a reference to a remote object. This method will resolve the well known name (if given) to a unique bus name when you call it. This means that if a well known name is released by one process and acquired by another calls to objects gained from this method will continue to operate on the original process.

引数
busnameThe bus name to connect to. Usually a well known bus name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16".
objectpathThe path on which the process is exporting the object.$
typeThe interface they are exporting it on. This type must have the same full class name and exposed method signatures as the interface the remote object is exporting.
戻り値
A reference to a remote object.
例外
ClassCastExceptionIf type is not a sub-type of DBusInterface
DBusExceptionIf busname or objectpath are incorrectly formatted or type is not in a package. Send a signal.
引数
signalThe signal to send.
477  {
478  queueOutgoing(signal);
479  }
void queueOutgoing(Message m)
Definition: AbstractConnection.java:481

◆ setWeakReferences()

void org.freedesktop.dbus.AbstractConnection.setWeakReferences ( boolean  weakreferences)
inline

If set to true the bus will not hold a strong reference to exported objects. If they go out of scope they will automatically be unexported from the bus. The default is to hold a strong reference, which means objects must be explicitly unexported before they will be garbage collected.

391  {
393  }
boolean weakreferences
Definition: AbstractConnection.java:259

◆ unExportObject()

void org.freedesktop.dbus.AbstractConnection.unExportObject ( String  objectpath)
inline

Stop Exporting an object

引数
objectpathThe objectpath to stop exporting.
452  {
453  synchronized (exportedObjects) {
454  exportedObjects.remove(objectpath);
455  objectTree.remove(objectpath);
456  }
457  }
Map< String, ExportedObject > exportedObjects
Definition: AbstractConnection.java:240
void remove(String path)
Definition: ObjectTree.java:115
ObjectTree objectTree
Definition: AbstractConnection.java:241

メンバ詳解

◆ _globalhandlerreference

_globalhandler org.freedesktop.dbus.AbstractConnection._globalhandlerreference
private

◆ _run

boolean org.freedesktop.dbus.AbstractConnection._run
protected

◆ addr

String org.freedesktop.dbus.AbstractConnection.addr
protected

◆ BUSNAME_REGEX

final String org.freedesktop.dbus.AbstractConnection.BUSNAME_REGEX = "^[-_a-zA-Z][-_a-zA-Z0-9]*(\\.[-_a-zA-Z][-_a-zA-Z0-9]*)*$"
staticpackage

◆ connected

boolean org.freedesktop.dbus.AbstractConnection.connected = false
protected

◆ CONNID_REGEX

final String org.freedesktop.dbus.AbstractConnection.CONNID_REGEX = "^:[0-9]*\\.[0-9]*$"
staticpackage

◆ dollar_pattern

final Pattern org.freedesktop.dbus.AbstractConnection.dollar_pattern = Pattern.compile("[$]")
staticpackage

◆ EXCEPTION_DEBUG

final boolean org.freedesktop.dbus.AbstractConnection.EXCEPTION_DEBUG
static

◆ exportedObjects

Map<String, ExportedObject> org.freedesktop.dbus.AbstractConnection.exportedObjects
protected

◆ fallbackcontainer

FallbackContainer org.freedesktop.dbus.AbstractConnection.fallbackcontainer
protected

◆ FLOAT_SUPPORT

final boolean org.freedesktop.dbus.AbstractConnection.FLOAT_SUPPORT
staticpackage

◆ handledSignals

Map<SignalTuple, Vector<DBusSigHandler<? extends DBusSignal> > > org.freedesktop.dbus.AbstractConnection.handledSignals
protected

◆ importedObjects

Map<DBusInterface, RemoteObject> org.freedesktop.dbus.AbstractConnection.importedObjects
protected

◆ infomap

final Map<Thread, DBusCallInfo> org.freedesktop.dbus.AbstractConnection.infomap = new HashMap<Thread, DBusCallInfo>()
staticprivate

◆ MAX_ARRAY_LENGTH

final int org.freedesktop.dbus.AbstractConnection.MAX_ARRAY_LENGTH = 67108864
staticpackage

◆ MAX_NAME_LENGTH

final int org.freedesktop.dbus.AbstractConnection.MAX_NAME_LENGTH = 255
staticpackage

◆ OBJECT_REGEX

final String org.freedesktop.dbus.AbstractConnection.OBJECT_REGEX = "^/([-_a-zA-Z0-9]+(/[-_a-zA-Z0-9]+)*)?$"
staticpackage

◆ objectTree

ObjectTree org.freedesktop.dbus.AbstractConnection.objectTree
private

◆ outgoing

EfficientQueue org.freedesktop.dbus.AbstractConnection.outgoing
package

◆ PENDING_MAP_INITIAL_SIZE

final int org.freedesktop.dbus.AbstractConnection.PENDING_MAP_INITIAL_SIZE = 10
staticprivate

Initial size of the pending calls map

◆ pendingCallbackReplys

Map<MethodCall, DBusAsyncReply<? extends Object> > org.freedesktop.dbus.AbstractConnection.pendingCallbackReplys
protected

◆ pendingCallbacks

Map<MethodCall, CallbackHandler<? extends Object> > org.freedesktop.dbus.AbstractConnection.pendingCallbacks
protected

◆ pendingCalls

EfficientMap org.freedesktop.dbus.AbstractConnection.pendingCalls
protected

◆ pendingErrors

LinkedList<Error> org.freedesktop.dbus.AbstractConnection.pendingErrors
package

◆ runnables

LinkedList<Runnable> org.freedesktop.dbus.AbstractConnection.runnables
protected

◆ sender

_sender org.freedesktop.dbus.AbstractConnection.sender
protected

◆ thread

_thread org.freedesktop.dbus.AbstractConnection.thread
protected

◆ THREADCOUNT

final byte org.freedesktop.dbus.AbstractConnection.THREADCOUNT = 4
staticpackage

◆ TIMEOUT

final int org.freedesktop.dbus.AbstractConnection.TIMEOUT = 100000
staticprotected

Timeout in us on checking the BUS for incoming messages and sending outgoing messages

◆ transport

Transport org.freedesktop.dbus.AbstractConnection.transport
protected

◆ weakreferences

boolean org.freedesktop.dbus.AbstractConnection.weakreferences = false
protected

◆ workers

LinkedList<_workerthread> org.freedesktop.dbus.AbstractConnection.workers
protected

このクラス詳解は次のファイルから抽出されました: