Package org.osgi.service.event

Examples of org.osgi.service.event.Event


  private void filterEntries() {
    synchronized(lock) {
      filteredEntries.clear();

      for(Iterator it = model.getEntries().iterator(); it.hasNext(); ) {
        Event e = (Event)it.next();
        if(isValidEntry(e)) {
          filteredEntries.add(e);
        }
      }
    }
View Full Code Here


  }


  void showNext(int delta) {
    if(entry != null && table != null) {
      Event e = table.getEventEntry(entry, delta);
      if(e != null) {
  setEntry(e);
 
  syncUI();
      }
View Full Code Here

 
  void showFirst() {
    if(entry != null && table != null) {
      try {
  java.util.List entries = table.model.getEntries();
  Event e = (Event)entries.get(0);
  if(e != null) {
    setEntry(e);
   
    syncUI();
  }
View Full Code Here

  void showLast() {
    if(entry != null && table != null) {
      try {
  java.util.List entries = table.model.getEntries();
  Event e = (Event)entries.get(entries.size() - 1);
  if(e != null) {
    setEntry(e);
   
    syncUI();
  }
View Full Code Here

    }
  }
 
  void syncUI() {
    if(entry != null && table != null) {
      Event prevE = table.getEventEntry(entry, -1);
      Event nextE = table.getEventEntry(entry, 1);
     
      prevButton.setEnabled(prevE != null);
     
      nextButton.setEnabled(nextE != null);
     
View Full Code Here

  public java.util.List getEntries() {
    return entries;
  }

  Event getEntry(int row) {
    Event e = (Event)entries.get(row);
    return e;
  }
View Full Code Here

    if (lsm.isSelectionEmpty()) {
      //
    } else {     
            int ix = lsm.getMinSelectionIndex();

      Event entry = JEventTable.this.model.getEntry(ix);

      if(entry != null) {
        JEventTable.this.logEntryDetail.setParentAndEntry(JEventTable.this, entry);
      }
     
View Full Code Here

    put( dict, EventConstants.SERVICE_OBJECTCLASS,
         event.getServiceReference().getProperty(Constants.OBJECTCLASS) );
    put( dict, EventConstants.SERVICE_PID,
         event.getServiceReference().getProperty(Constants.SERVICE_PID) );

    return new Event( path, (Dictionary) dict );
  }
View Full Code Here

              /* send the message */
              System.out.println(getName()
                                 + " sending a synchronus event with message:"
                                 + message.toString() + "and the topic:"
                                 + topicToSend);
              eventAdmin.sendEvent(new Event(topicToSend, message));
            }
          }
        };

      synchDeliver.start();
      synchDeliver.join();

      Thread asynchDeliver = new Thread() {
          public void run() {

            for (int i = 0; i < messageTosend; i++) {
              /* create the hasht table */
              Dictionary message = new Hashtable();
              /* create the message */
              message.put("Asynchronus message", new Integer(i));
              /* Sends a synchronous event to the admin */
              System.out.println(getName()
                                 + " sending an Asynchronus event with message:"
                                 + message.toString() + "and the topic:"
                                 + topicToSend);
              eventAdmin.postEvent(new Event(topicToSend, message));
            }
          }
        };
      asynchDeliver.start();
      asynchDeliver.join();
View Full Code Here

              /* a Hash table to store message in */
              Dictionary message = new Hashtable();
              /* put some properties into the messages */
              message.put("Synchronus message",new Integer(i));
              /* send the message */
              eventAdmin.sendEvent(new Event("com/acme/timer", message));

            }
          }


View Full Code Here

TOP

Related Classes of org.osgi.service.event.Event

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.