コード例 #1
0
 public ListenerManager getListenerManager() {
   return synchronizer.synchronize(
       new Factory<ListenerManager>() {
         public ListenerManager create() {
           assertInitialized();
           return listenerManager.get();
         }
       });
 }
コード例 #2
0
 public DefaultProgressLoggerFactory getProgressLoggerFactory() {
   return synchronizer.synchronize(
       new Factory<DefaultProgressLoggerFactory>() {
         public DefaultProgressLoggerFactory create() {
           assertInitialized();
           return progressLoggerFactory.get();
         }
       });
 }
コード例 #3
0
 public void dispatch(final T message) {
   if (!(message instanceof OutputEvent)) {
     LOGGER.debug("thread {}: dispatching {}", Thread.currentThread().getId(), message.getClass());
   }
   sync.synchronize(
       new Runnable() {
         public void run() {
           delegate.dispatch(message);
         }
       });
 }
コード例 #4
0
 public void init() {
   synchronizer.synchronize(
       new Runnable() {
         public void run() {
           DefaultListenerManager manager = new DefaultListenerManager();
           listenerManager.set(manager);
           progressLoggerFactory.set(
               new DefaultProgressLoggerFactory(
                   manager.getBroadcaster(ProgressListener.class), new TrueTimeProvider()));
         }
       });
 }