Example usage for java.util Dictionary put

List of usage examples for java.util Dictionary put

Introduction

In this page you can find the example usage for java.util Dictionary put.

Prototype

public abstract V put(K key, V value);

Source Link

Document

Maps the specified key to the specified value in this dictionary.

Usage

From source file:org.everit.osgi.jdbc.commons.dbcp.internal.Util.java

public static void addReferenceIdsToServiceProperties(String prefix, Map<String, Object> referenceProps,
        Dictionary<String, Object> serviceProps) {

    Object serviceId = referenceProps.get("service.id");
    if (serviceId != null) {
        serviceProps.put(prefix + ".service.id", serviceId);
    }//from w w w  .j av  a  2 s . com

    Object servicedPid = referenceProps.get("service.pid");
    if (servicedPid != null) {
        serviceProps.put(prefix + ".service.pid", servicedPid);
    }
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates a new "endpoint display name changed" <tt>Event</tt>, which
 * conference ID to the JID of the associated MUC.
 *
 * @param conferenceId the ID of the COLIBRI conference.
 * @param endpointId the ID of the COLIBRI endpoint.
 * @param displayName the new display name.
 *
 * @return the <tt>Event</tt> which was created.
 *//*from  ww  w.  jav  a 2  s.com*/
public static Event endpointDisplayNameChanged(String conferenceId, String endpointId, String displayName) {
    Dictionary properties = new Hashtable(3);
    properties.put(CONFERENCE_ID_KEY, conferenceId);
    properties.put(ENDPOINT_ID_KEY, endpointId);
    properties.put(DISPLAY_NAME_KEY, displayName);
    return new Event(ENDPOINT_DISPLAY_NAME_CHANGED_TOPIC, properties);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates a new "room conference" <tt>Event</tt> which binds a COLIBRI
 * conference ID to the JID of the associated MUC.
 *
 * @param conferenceId the ID of the COLIBRI conference.
 * @param roomJid the JID of the MUC for which the focus was created.
 *
 * @return the <tt>Event</tt> which was created.
 *///  ww w  . j a  v a  2s  .  c  o  m
public static Event conferenceRoom(String conferenceId, String roomJid, String focus, String bridgeJid) {
    Dictionary properties = new Hashtable(3);
    properties.put(CONFERENCE_ID_KEY, conferenceId);
    properties.put(ROOM_JID_KEY, roomJid);
    properties.put(FOCUS_ID_KEY, focus);
    properties.put(BRIDGE_JID_KEY, bridgeJid);
    return new Event(CONFERENCE_ROOM_TOPIC, properties);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates new "authentication session destroyed" event.
 *
 * @param sessionId authentication session identifier string.
 *
 * @return created "authentication session destroyed" <tt>Event</tt>.
 *///w  w  w .  j  a  va  2 s  . co  m
public static Event authSessionDestroyed(String sessionId) {
    Dictionary<String, String> eventProps = new Hashtable<String, String>(1);

    eventProps.put(AUTH_SESSION_ID_KEY, sessionId);

    return new Event(AUTH_SESSION_DESTROYED_TOPIC, eventProps);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates new "focus created" event./* w w w.java 2s  .c o m*/
 *
 * @param focusId focus instance identifier.
 * @param roomName MUC room JID for which the focus has been created.
 *
 * @return new "focus created" <tt>Event</tt>.
 */
public static Event focusCreated(String focusId, String roomName) {
    Dictionary<String, String> eventProps = new Hashtable<String, String>(2);

    eventProps.put(FOCUS_ID_KEY, focusId);
    eventProps.put(ROOM_JID_KEY, roomName);

    return new Event(FOCUS_CREATED_TOPIC, eventProps);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates new "focus destroyed" event./*from   w w  w.  j  av a 2s . co m*/
 *
 * @param focusId focus instance identifier.
 * @param roomName MUC room JID for which the focus has been destroyed.
 *
 * @return new "focus destroyed" <tt>Event</tt> instance.
 */
public static Event focusDestroyed(String focusId, String roomName) {
    Dictionary<String, String> eventProps = new Hashtable<String, String>(2);

    eventProps.put(FOCUS_ID_KEY, focusId);
    eventProps.put(ROOM_JID_KEY, roomName);

    return new Event(FOCUS_DESTROYED_TOPIC, eventProps);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates "endpoint authenticated" event.
 *
 * @param sessionId authentication session identifier.
 * @param focusId focus instance id which was hosting the conference session
 * @param endpointId the ID of authenticated Colibri endpoint(participant).
 *
 * @return created "endpoint authenticated" <tt>Event</tt>.
 *//* w ww.j ava  2 s  .  com*/
public static Event endpointAuthenticated(String sessionId, String focusId, String endpointId) {
    Dictionary<String, String> eventProps = new Hashtable<String, String>(2);

    eventProps.put(AUTH_SESSION_ID_KEY, sessionId);
    eventProps.put(FOCUS_ID_KEY, focusId);
    eventProps.put(ENDPOINT_ID_KEY, endpointId);

    return new Event(ENDPOINT_AUTHENTICATED_TOPIC, eventProps);
}

From source file:org.jitsi.jicofo.log.EventFactory.java

/**
 * Creates new "authentication session created" event.
 *
 * @param sessionId authentication session identifier.
 * @param userIdentity authenticated user identity
 * @param machineUid machine unique identifier used to distinguish session
 *                   for the same user on different machines.
 * @param properties the map of additional properties to be logged provided
 *                   during authentication.
 *
 * @return "authentication session created" <tt>Event</tt>
 *//*  w w w  .j av a2 s. c o  m*/
public static Event authSessionCreated(String sessionId, String userIdentity, String machineUid,
        Map<String, String> properties) {
    Dictionary<String, String> eventProps = new Hashtable<String, String>(4);

    eventProps.put(AUTH_SESSION_ID_KEY, sessionId);
    eventProps.put(USER_IDENTITY_KEY, userIdentity);
    eventProps.put(MACHINE_UID_KEY, machineUid);

    String mergedProperties = mergeProperties(properties);

    eventProps.put(AUTH_PROPERTIES_KEY, mergedProperties);

    return new Event(AUTH_SESSION_CREATED_TOPIC, eventProps);
}

From source file:org.polymap.core.CorePlugin.java

/**
 * Registers a servlet into the URI namespace. This helper provides some
 * convenience over raw {@link HttpService}.
 * <p/>//from  w w w  .ja  v  a  2s  .  c  o m
 * The {@link CorePlugin} runs a {@link ServiceTracker} for {@link HttpService}. Callers
 * of this method don't need to check for an existing {@link HttpService}.
 * 
 * @see HttpService
 */
public static void registerServlet(String alias, HttpServlet servlet, Dictionary initParams,
        HttpContext context) throws Exception {

    HttpService httpService = getDefault().httpServiceTracker.getHttpService();

    initParams = initParams != null ? initParams : new Hashtable();
    initParams.put("alias", alias);

    httpService.registerServlet(alias, servlet, initParams, context);
}

From source file:org.openhab.binding.modbus.internal.TestCaseSupport.java

protected static Dictionary<String, Object> newLongPollBindingConfig() {
    Dictionary<String, Object> config = new Hashtable<>();
    config.put("poll", String.valueOf(REFRESH_INTERVAL));
    return config;
}