01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.ows;
06:
07: import org.geoserver.platform.Operation;
08: import java.io.IOException;
09: import java.io.OutputStream;
10:
11: public class MessageResponse extends Response {
12: public MessageResponse() {
13: super (Message.class);
14: }
15:
16: public String getMimeType(Object value, Operation operation) {
17: return "text/plain";
18: }
19:
20: public void write(Object value, OutputStream output,
21: Operation operation) throws IOException {
22: Message message = (Message) value;
23: output.write(message.message.getBytes());
24: }
25:
26: public void abort(Object value, OutputStream output,
27: Operation operation) throws IOException {
28: }
29: }
|