Tabnine Logo
EventController.fireEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
fireEvent
method
in
de.tsl2.nano.core.messaging.EventController

Best Java code snippets using de.tsl2.nano.core.messaging.EventController.fireEvent (Showing top 7 results out of 315)

origin: net.sf.tsl2nano/tsl2.nano.vnet

  /**
   * provides the un-threaded super fire-method. see {@link EventController#fireEvent(Object)}
   * 
   * @param e new event
   */
  public void sendEvent(final Object e) {
    super.fireEvent(e);
  }
}
origin: net.sf.tsl2nano/tsl2.nano.vnet

  /**
   * provides the un-threaded super fire-method. see {@link EventController#fireEvent(Object)}
   * 
   * @param e new event
   */
  public void sendEvent(final Object e) {
    super.fireEvent(e);
  }
}
origin: net.sf.tsl2nano/tsl2.nano.vnet

/**
 * addResponse
 * @param srcPath path of responding node
 * @param aresponse response of a node
 */
public void addResponse(String srcPath, Object aresponse) {
  if (response == null) {
    response = new ConcurrentHashMap<String, Object>();
  }
  //concurrenthashmap is not able to store null values!
  if (aresponse != null) {
    response.put(srcPath, aresponse);
  }
  if (responseController != null) {
    responseController.fireEvent(new Notification(srcPath, aresponse));
  }
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * {@inheritDoc}
 */
@Override
public void setValue(T object) {
  if (changeHandler == null || !changeHandler.hasListeners()) {
    this.value = object;
  } else {
    final T oldValue = getValue();
    final ChangeEvent event = new ChangeEvent(this, false, false, oldValue, object);
    changeHandler.fireEvent(event);
    if (!event.breakEvent) {
      this.value = object;
      event.hasChanged = true;
      changeHandler.fireEvent(event);
    }
  }
}
origin: net.sf.tsl2nano/tsl2.nano.cursus

cons.addAll(evalTimedConsiliums(cons, timer.from, timer.until));
CommandManager cmdManager = new CommandManager();
getEventController().fireEvent(cons.size());
for (IConsilium c : cons) {
  if (stop.get()) {
    eventController.fireEvent(STOPPED);
    break;
      eventController.fireEvent(c);
      log("expired: " + c.getName() + " with timer: "+ c.getTimer());
      cmdManager.doIt(c.getExsecutios().toArray(new ICommand[0]));
      c.setStatus(Status.ACTIVE);
      c.refreshSeal(ID);
      eventController.fireEvent(c);
    } catch (Exception ex) {
      LOG.error(ex);
      eventController.fireEvent(ex);
eventController.fireEvent(FINISHED);
log("processing finished");
log("------------------------------------------------------------------------------");
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * setValue. informs all registered listeners
 * 
 * @param value new value
 */
@Override
public void setValue(T value) {
  final Object oldValue = getValue();
  final ChangeEvent event = new ChangeEvent(this, false, false, oldValue, value);
  changeHandler().fireEvent(event);
  if (!event.breakEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("setting new value for attribute '" + getName() + "': " + value);
    }
    setValue(instance, value);
    if (isDoValidation()) {
      T assignValue = getValue();
      value = //the type may be changed through wrap()
        value != null && oldValue != assignValue
          && (getType().equals(Object.class) || !PrimitiveUtil.isAssignableFrom(getType(), value.getClass())) ? assignValue : value;
      status = isValid(value);
    }
    event.hasChanged = true;
    changeHandler().fireEvent(event);
  }
}
origin: net.sf.tsl2nano/tsl2.nano.vnet

  /**
   * {@inheritDoc}
   */
  @Override
  public void handleEvent(Notification event) {
    waitToBeIdle();
    increaseStatus();
    Net.log_("node " + core + " starts working on " + event + "...");
    try {
      long start = System.currentTimeMillis();
      core.handleEvent(event);
      long workingTime = System.currentTimeMillis() - start;
//        decreaseStatus();
      Net.log("work done on " + event + " in " + workingTime + " msecs");
      statistics.addWorkingTime(workingTime);

      /*
       * send the notification to all neighbours
       * each connection has a different weight, the connection.handle() will handle that!
       */
      event.path = null;
      controller.fireEvent(event);
//        } catch (Exception ex) {
//            LOG.error(ex);
    } finally {
      setIdle();
    }
  }
 
de.tsl2.nano.core.messagingEventControllerfireEvent

Popular methods of EventController

  • addListener
  • <init>
  • fireValueChange
  • getEventType
  • getListeners
  • handle
  • hasListeners
  • removeListener
  • reset

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now