Package java.util

Examples of java.util.Dictionary


    // readEndTag
    void readElement(PushbackReader r) throws Exception {
        readStartOfTag(r);
        String elementType = readElementType(r);

        Dictionary attributes = readAttributes(r);
        boolean notEmptyElement = readEndOfStartTag(r);

        startElement(elementType, attributes);
        String content = null;
        if (notEmptyElement) {
View Full Code Here


        r.unread(c);
        return xmlName.toString();
    }

    Dictionary readAttributes(PushbackReader r) throws Exception {
        Dictionary attributes = null;
        while (nextNonWhitespaceIsANameStartChar(r)) {
            String name = readXMLName(r);
            char c = readNextChar(r);
            throwIfNotExpectedChar(c, '=');
            String value = readAttributeValue(r);
            if (attributes == null) {
                attributes = new Hashtable();
            }
            attributes.put(name, value);
        }
        return attributes;
    }
View Full Code Here

    final HashMap filters = configuration.getFilters();
    Integer level;

    level = (Integer) filters.get(bundle.getLocation());
    if (level == null) {
      Dictionary d = bundle.getHeaders("");
      String l = (String)d.get("Bundle-SymbolicName");
      if (l == null) {
        l = (String)d.get("Bundle-Name");
      }
      if (l != null) {
        level = (Integer) filters.get(l);
      }
    }
View Full Code Here

    /* Stores the properties of the event in the dictionary, if the event is known */
    if (knownMessageType) {
      if(!Activator.handlerTracker.anyHandlersMatching(topic)) {
        return;
      }
      Dictionary props = new Hashtable();
      Bundle bundle = bundleEvent.getBundle();
      putProp(props, EventConstants.EVENT, bundleEvent);
      putProp(props, "bundle.id", new Long(bundle.getBundleId()));
      putProp(props, EventConstants.BUNDLE_SYMBOLICNAME, bundle.getSymbolicName());
      putProp(props, "bundle", bundle);
View Full Code Here

      return;
    }


    Bundle bundle = logEntry.getBundle();
    Dictionary props = new Hashtable();

    /* Stores the properties of the event in the dictionary */
    if (bundle != null) {
      putProp(props, "bundle.id", new Long(bundle.getBundleId()));
      putProp(props, EventConstants.BUNDLE_SYMBOLICNAME, bundle.getLocation());
View Full Code Here

    /* Stores the properties of the event in the dictionary, if the event is known */
    if (knownMessageType) {
      if(!Activator.handlerTracker.anyHandlersMatching(topic)) {
        return;
      }
      Dictionary props = new Hashtable();
      putProp(props, EventConstants.EVENT, serviceEvent);
      putProp(props, EventConstants.SERVICE, serviceEvent.getServiceReference());
      putProp(props, EventConstants.SERVICE_PID, serviceEvent.getServiceReference().getProperty(Constants.SERVICE_PID));
      putProp(props, EventConstants.SERVICE_ID, serviceEvent.getServiceReference().getProperty(Constants.SERVICE_ID));
      putProp(props, EventConstants.SERVICE_OBJECTCLASS, serviceEvent.getServiceReference().getProperty(Constants.OBJECTCLASS));
View Full Code Here

    if (knownMessageType) {
      if(!Activator.handlerTracker.anyHandlersMatching(topic)) {
        return;
      }
      Dictionary props = new Hashtable();
      Bundle bundle = frameworkEvent.getBundle();
      putProp(props, "event", frameworkEvent);
      /* If the event contains a bundle, further properties shall be set */
      if (frameworkEvent.getBundle() != null) {
        putProp(props, "bundle.id", new Long(bundle.getBundleId()));
View Full Code Here

      asynchMessages = 0;
      synchMessages = 0;
      System.out
        .println("!!! TO RUN THIS TEST CORRECTLY TWO EVENTADMINS NEEDS TO RUN IN THE FRAMEWORK!!!");
      /* create the hashtable to put properties in */
      Dictionary props = new Hashtable();
      /* determine what topicType to use */
      /* put service.pid property in hashtable */
      props.put(EventConstants.EVENT_TOPIC, topicsToConsume);

      /* register the service */
      serviceRegistration = bundleContext.registerService(
                                                          EventHandler.class.getName(), this, props);

View Full Code Here

      Thread thread = new Thread() {
          public void run() {
            int i = 0;
            while (running && i<500) {
              /* a Hash table to store message in */
              Dictionary message = new Hashtable();
              /* put some properties into the messages */
              message.put("Synchronus message", new Integer(i));
              /* print for the console */
              System.out.println(getName()
                                 + " sending a synchronus event with message:"
                                 + message.toString() + "and the topic:"
                                 + topicToSend);

              /* send the message */
              eventAdmin.sendEvent(new Event(topicToSend, message));

View Full Code Here

      Thread thread = new Thread() {
          public void run() {
            int i = 0;
            while (running && i<500) {
              /* a Hash table to store message in */
              Dictionary message = new Hashtable();
              /* put some properties into the messages */
              message.put("Asynchronus message", new Integer(i));
              /* print for the console */
              System.out.println(getName()
                                 + " sending a asynchronus event with message:"
                                 + message.toString() + "and the topic:"
                                 + topicToSend);
              /* send the message */
              eventAdmin.postEvent(new Event(topicToSend, message));
              synchronized (dummySemaphore) {
                if (shouldRegister) {
View Full Code Here

TOP

Related Classes of java.util.Dictionary

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.