KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > adaptor > http > EmptyCommandProcessor


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8 package mx4j.tools.adaptor.http;
9
10 import java.io.IOException JavaDoc;
11 import javax.management.JMException JavaDoc;
12
13 import org.w3c.dom.Document JavaDoc;
14 import org.w3c.dom.Element JavaDoc;
15
16 /**
17  * EmptyCommandProcessor, returns an empty xml tree
18  *
19  * @version $Revision: 1.3 $
20  */

21 public class EmptyCommandProcessor extends HttpCommandProcessorAdaptor
22 {
23
24    /**
25     * Constructs a new EmptyCommandProcessor
26     */

27    public EmptyCommandProcessor()
28    {
29    }
30
31
32    public Document JavaDoc executeRequest(HttpInputStream in)
33            throws IOException JavaDoc, JMException JavaDoc
34    {
35       Document JavaDoc document = builder.newDocument();
36
37       Element JavaDoc root = document.createElement("empty");
38       document.appendChild(root);
39
40       return document;
41    }
42
43 }
44
45
Popular Tags