1 17 package org.apache.geronimo.webservices; 18 19 import java.io.IOException ; 20 import java.io.InputStream ; 21 import java.io.OutputStream ; 22 import java.io.Serializable ; 23 import java.net.URI ; 24 import java.util.Map ; 25 26 29 public interface WebServiceContainer extends Serializable { 30 31 36 public static final String POJO_INSTANCE = WebServiceContainer.class.getName()+"@pojoInstance"; 37 38 43 public static final String MESSAGE_CONTEXT = WebServiceContainer.class.getName()+"@MessageContext"; 44 45 48 public String LOCATION_REPLACEMENT_TOKEN = "LOCATIONREPLACEMENTTOKEN"; 49 50 void invoke(Request request, Response response) throws Exception ; 51 52 void getWsdl(Request req, Response res) throws Exception ; 53 54 public interface Request { 55 56 int OPTIONS = 0; 58 int GET = 1; 60 int HEAD = 2; 62 int POST = 3; 64 int PUT = 4; 66 int DELETE = 5; 68 int TRACE = 6; 70 int CONNECT = 7; 72 int UNSUPPORTED = 8; 73 74 String HEADER_ACCEPT = "Accept"; 75 76 String HEADER_ACCEPT_ENCODING = "Accept-Encoding"; 77 78 String HEADER_ACCEPT_LANGUAGE = "Accept-Language"; 79 80 String HEADER_CONTENT_TYPE = "Content-Type"; 81 82 String HEADER_CONTENT_LENGTH = "Content-Length"; 83 84 String HEADER_CONNECTION = "Connection"; 85 86 String HEADER_CACHE_CONTROL = "Cache-Control"; 87 88 String HEADER_HOST = "Host"; 89 90 String HEADER_USER_AGENT = "User-Agent"; 91 92 String HEADER_SET_COOKIE = "Set-Cookie"; 93 94 String HEADER_COOKIE = "Cookie"; 95 96 String getHeader(String name); 97 98 URI getURI(); 99 100 int getContentLength(); 101 102 String getContentType(); 103 104 InputStream getInputStream() throws IOException ; 105 106 int getMethod(); 107 108 String getParameter(String name); 109 110 Map getParameters(); 111 112 Object getAttribute(String name); 113 114 void setAttribute(String name, Object value); 115 } 116 117 public interface Response { 118 void setHeader(String name, String value); 119 120 String getHeader(String name); 121 122 OutputStream getOutputStream(); 123 124 void setStatusCode(int code); 125 126 int getStatusCode(); 127 128 void setContentType(String type); 129 130 String getContentType(); 131 132 void setStatusMessage(String responseString); 133 } 134 135 } 136 | Popular Tags |