cz.cuni.amis.pogamut.defcon.utils
Class SyncMethodExecContainer

Package class diagram package SyncMethodExecContainer
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.utils.SyncMethodExecContainer

public class SyncMethodExecContainer
extends Object

Container for execution of queries from game info in the main thread from other threads.

Author:
Radek 'Black_Hand' Pibil

Field Summary
 Object lock
           
 Method method
           
 Object[] parameters
           
 Object returnValue
           
 boolean used
           
 
Constructor Summary
SyncMethodExecContainer(Method method, Object[] parameters)
           
 
Method Summary
 void execute()
          Called in the main thread to execute herein contained method with a given parameters and collecting the return value.
 Object getLock()
           
 Object syncCallInMainThread()
          Enqueue and wait for execution of the herein contained method in the main thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

public volatile Method method

parameters

public volatile Object[] parameters

returnValue

public volatile Object returnValue

lock

public volatile Object lock

used

public volatile boolean used
Constructor Detail

SyncMethodExecContainer

public SyncMethodExecContainer(Method method,
                               Object[] parameters)
Method Detail

execute

public void execute()
Called in the main thread to execute herein contained method with a given parameters and collecting the return value.


syncCallInMainThread

public Object syncCallInMainThread()
Enqueue and wait for execution of the herein contained method in the main thread.

Returns:

getLock

public Object getLock()


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.