org.jboss.remoting.transport.http.HTTPMetadataConstants properties
The following are keys to use to get corresponding values from the Map returned from call to org.jboss.remoting.InvocationRequest.getRequestPayload() within a org.jboss.remoting.ServerInvocationHandler implementation. For example: public Object invoke(InvocationRequest invocation) throws Throwable { Map headers = invocation.getRequestPayload(); ... where variable 'headers' will contain entries for the following keys. METHODTYPE (actual value is 'MethodType') - key for getting the method type used by client in http request. This will be populated within the Map returned from call to org.jboss.remoting.InvocationRequest.getRequestPayload() within a org.jboss.remoting.ServerInvocationHandler implementation. For example: public Object invoke(InvocationRequest invocation) throws Throwable { Map headers = invocation.getRequestPayload(); String methodType = (String) headers.get(HTTPMetadataConstants.METHODTYPE); if(methodType != null) { if(methodType.equals("GET")) ... PATH (actual value is 'Path') - key for getting the path from the url request from the calling client. This will be populated within the Map returned from call to org.jboss.remoting.InvocationRequest.getRequestPayload() within a org.jboss.remoting.ServerInvocationHandler implementation. For example: public Object invoke(InvocationRequest invocation) throws Throwable { Map headers = invocation.getRequestPayload(); String path = (String) headers.get(HTTPMetadataConstants.PATH); ... HTTPVERSION (actual value is 'HttpVersion') - key for getting the HTTP version from the calling client request (e.g. HTTP/1.1). RESPONSE_CODE (actual value is 'ResponseCode') - key for getting and setting the HTTP response code. Will be used as key to get the response code from metadata Map passed to the Client's invoke() method after the invocation has been made. For example: Map metadata = new HashMap(); Object response = remotingClient.invoke(myPayloadObject, metadata); Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE); Will be used as key to put the response code in the return payload map from invocation handler. For example: public Object invoke(InvocationRequest invocation) throws Throwable { Map responseHeaders = invocation.getReturnPayload(); responseHeaders.put(HTTPMetadataConstants.RESPONSE_CODE, new Integer(202)); RESPONSE_CODE_MESSAGE (actual value is 'ResponseCodeMessage') - key for getting and setting the HTTP response code message. Will be used as the key to get the response code message from metadata Map passed to the Client's invoke() method after the invocation has been made. For example: Map metadata = new HashMap(); Object response = remotingClient.invoke(myPayloadObject, metadata); String responseCodeMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE); Will be used as key to put the response code message in the return payload map from invocation handler. For example: public Object invoke(InvocationRequest invocation) throws Throwable { Map responseHeaders = invocation.getReturnPayload(); responseHeaders.put( HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, "Custom response code and message from remoting server"); RESPONSE_HEADERS (actual value is 'ResponseHeaders') - key for returning the value of java.net.URLConnection.getHeaderFields(). In other words, a map containing all of the response headers is stored in the metadata map. For example, Object payload = ... ; HashMap metadata = new HashMap(); client.invoke(payload, metadata); Map responseHeaders = (Map) metadata.get(HTTPMetadataConstants.RESPONSE_HEADERS); NO_THROW_ON_ERROR (actual value is 'NoThrowOnError') - key indicating if http client invoker (for transports http, https, servlet, and sslservlet) should throw an exception if the server response code is equal to or greater than 400. Unless set to true, the client invoker will by default throw either the exception that originated on the server (if using remoting server) or throw a org.jboss.remoting.transport.http.WebServerError, whose message will be the error html returned from the web server. DONT_RETURN_EXCEPTION (actual value is 'dont-return-exception') - key indicating if org.jboss.remoting.transport.servlet.ServletServerInvoker should revert to the orginal error handling behavior of returning an error message. USE_REMOTING_CONTENT_TYPE (actual value is 'useRemotingContentType') - key indicating if org.jboss.remoting.marshal.http.HTTPUnMarshaller should determine that it is reading a String by using the "content-type" return header (if set to "false") or the "remotingContentType" header if set to "true". The default value is "false", to avoid introducing any inconsistent behavior between versions, but, if the org.jboss.remoting.ServerInvocationHandler sets the content-type return header, then this parameter should be set to "true". For every http client request made from remoting client, a remoting version and remoting specific user agent will be set as a request property. The request property key for the remoting version will be 'JBoss-Remoting-Version' and the value will be set based on return from call to Version.getDefaultVersion(). The 'User-Agent' request property value will be set to the evaluation of '"JBossRemoting - " + Version.VERSION'.