Java Dictionary Usage getSpringContextHeader(Dictionary headers)

Here you can find the source of getSpringContextHeader(Dictionary headers)

Description

Return the #SPRING_CONTEXT_HEADER if present from the given dictionary.

License

Open Source License

Declaration

public static String getSpringContextHeader(Dictionary<String, String> headers) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2009 SpringSource, a divison of VMware, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*w  ww .  j av a 2 s  .  c o  m*/
 *     SpringSource, a division of VMware, Inc. - initial API and implementation
 *******************************************************************************/

import java.util.Dictionary;

public class Main {
    /**
     * Manifest entry name for configuring Spring application context.
     */
    public static final String SPRING_CONTEXT_HEADER = "Spring-Context";

    /**
     * Return the {@value #SPRING_CONTEXT_HEADER} if present from the given dictionary.
     */
    public static String getSpringContextHeader(Dictionary<String, String> headers) {
        Object header = null;
        if (headers != null)
            header = headers.get(SPRING_CONTEXT_HEADER);
        return (header != null ? header.toString().trim() : null);
    }
}

Related

  1. addReferenceIdsToServiceProperties(String prefix, Map referenceProps, Dictionary serviceProps)
  2. containsKey(Dictionary dict, String key)
  3. getBoolean(Dictionary p, Object key, Boolean defaultValue)
  4. getState(Dictionary conf, String property)
  5. getString(Dictionary p, Object key, String defaultValue)
  6. isNullOrNothing(final Object[] array)
  7. parseRequestOption(Dictionary conf, String confParam, Map requestOptions)