Example usage for com.vaadin.server VaadinRequest getHeaderNames

List of usage examples for com.vaadin.server VaadinRequest getHeaderNames

Introduction

In this page you can find the example usage for com.vaadin.server VaadinRequest getHeaderNames.

Prototype

public Enumeration<String> getHeaderNames();

Source Link

Document

Returns an enumeration of all the header names this request contains.

Usage

From source file:com.mycollab.web.DesktopApplication.java

License:Open Source License

private String printRequest(VaadinRequest request) {
    StringBuilder requestInfo = new StringBuilder();
    Enumeration<String> headerNames = request.getHeaderNames();
    while (headerNames.hasMoreElements()) {
        String attr = headerNames.nextElement();
        requestInfo.append(attr + ": " + request.getHeader(attr)).append('\n');
    }/*from w w  w .j  av a  2s  . c  o m*/
    requestInfo.append("Subdomain: " + Utils.getSubDomain(request)).append('\n');
    requestInfo.append("Remote address: " + request.getRemoteAddr()).append('\n');
    requestInfo.append("Path info: " + request.getPathInfo()).append('\n');
    requestInfo.append("Remote host: " + request.getRemoteHost()).append('\n');
    return requestInfo.toString();
}