You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/25 21:14:45 UTC
svn commit: r511588 [5/8] - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: ./
addressing/ addressing/wsdl/ builder/ client/ context/ dataretrieval/
dataretrieval/client/ deployment/ deployment/resolver/ deployment/util/
descripti...
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpFactory.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpFactory.java Sun Feb 25 12:14:38 2007
@@ -29,10 +29,6 @@
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-
import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
@@ -60,6 +56,9 @@
import org.apache.http.protocol.ResponseDate;
import org.apache.http.protocol.ResponseServer;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+
/**
* Factory used to configure and create the various instances required in http transports.
* Either configure this class in axis2.xml, or in code via the setters, or subclass it and specialize some factory methods to gain more control.
@@ -68,31 +67,49 @@
*/
public class HttpFactory {
- /** Name of axis2.xml port parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml port parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_PORT = "port";
- /** Name of axis2.xml hostname parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml hostname parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_HOST_ADDRESS = "hostname";
- /** Name of axis2.xml originServer parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml originServer parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_ORIGIN_SERVER = "originServer";
- /** Name of axis2.xml requestTimeout parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml requestTimeout parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_REQUEST_SOCKET_TIMEOUT = "requestTimeout";
- /** Name of axis2.xml requestTcpNoDelay parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml requestTcpNoDelay parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_REQUEST_TCP_NO_DELAY = "requestTcpNoDelay";
- /** Name of axis2.xml requestCoreThreadPoolSize parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml requestCoreThreadPoolSize parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_REQUEST_CORE_THREAD_POOL_SIZE = "requestCoreThreadPoolSize";
- /** Name of axis2.xml requestMaxThreadPoolSize parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml requestMaxThreadPoolSize parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_REQUEST_MAX_THREAD_POOL_SIZE = "requestMaxThreadPoolSize";
- /** Name of axis2.xml threadKeepAliveTime parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml threadKeepAliveTime parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_THREAD_KEEP_ALIVE_TIME = "threadKeepAliveTime";
- /** Name of axis2.xml threadKeepAliveTimeUnit parameter for SimpleHTTPServer configuration */
+ /**
+ * Name of axis2.xml threadKeepAliveTimeUnit parameter for SimpleHTTPServer configuration
+ */
public static final String PARAMETER_THREAD_KEEP_ALIVE_TIME_UNIT = "threadKeepAliveTimeUnit";
private ConfigurationContext configurationContext;
@@ -111,7 +128,9 @@
private static final QName HTTP_NAME = new QName(Constants.TRANSPORT_HTTP);
- /** Create and configure a new HttpFactory */
+ /**
+ * Create and configure a new HttpFactory
+ */
public HttpFactory(ConfigurationContext configurationContext) throws AxisFault {
this.configurationContext = configurationContext;
httpConfiguration = configurationContext.getAxisConfiguration().getTransportIn(HTTP_NAME);
@@ -126,13 +145,17 @@
threadKeepAliveTimeUnit = getTimeUnitParam(PARAMETER_THREAD_KEEP_ALIVE_TIME_UNIT, TimeUnit.SECONDS);
}
- /** Create and configure a new HttpFactory */
+ /**
+ * Create and configure a new HttpFactory
+ */
public HttpFactory(ConfigurationContext configurationContext, int port) throws AxisFault {
this(configurationContext);
this.port = port;
}
- /** Create and configure a new HttpFactory */
+ /**
+ * Create and configure a new HttpFactory
+ */
public HttpFactory(ConfigurationContext configurationContext, int port, WorkerFactory requestWorkerFactory) throws AxisFault {
this(configurationContext, port);
this.requestWorkerFactory = requestWorkerFactory;
@@ -140,40 +163,45 @@
private int getIntParam(String name, int def) {
String config = getStringParam(name, null);
- if (config!=null)
+ if (config != null) {
return Integer.parseInt(config);
- else
+ } else {
return def;
}
+ }
private long getLongParam(String name, long def) {
String config = getStringParam(name, null);
- if (config!=null)
+ if (config != null) {
return Long.parseLong(config);
- else
+ } else {
return def;
}
+ }
private boolean getBooleanParam(String name, boolean def) throws AxisFault {
String config = getStringParam(name, null);
if (config!=null) {
- if (config.equals("yes") || config.equals("true"))
+ if (config.equals("yes") || config.equals("true")) {
return true;
- else if (config.equals("no") || config.equals("false"))
+ } else if (config.equals("no") || config.equals("false")) {
return false;
- else throw new AxisFault("Boolean value must be yes, true, no or false for parameter " + name + ": " + config);
+ } else {
+ throw new AxisFault("Boolean value must be yes, true, no or false for parameter " + name + ": " + config);
+ }
}
return def;
}
private TimeUnit getTimeUnitParam(String name, TimeUnit def) throws AxisFault {
String config = getStringParam(name, null);
- if (config!=null)
+ if (config != null) {
try {
return (TimeUnit) TimeUnit.class.getField(config).get(null);
} catch (Exception e) {
throw new AxisFault(e);
}
+ }
return def;
}
@@ -182,13 +210,16 @@
if (param!=null) {
// assert param.getParameterType() == Parameter.TEXT_PARAMETER;
String config = (String) param.getValue();
- if (config!=null)
+ if (config != null) {
return config;
}
+ }
return def;
}
- /** Return the configured listener manager or create and configure one with configurationContext */
+ /**
+ * Return the configured listener manager or create and configure one with configurationContext
+ */
public ListenerManager getListenerManager() {
ListenerManager lm = configurationContext.getListenerManager();
if (lm==null) {
@@ -198,24 +229,32 @@
return lm;
}
- /** Create the executor used to launch the single requestConnectionListener */
+ /**
+ * Create the executor used to launch the single requestConnectionListener
+ */
public ExecutorService newListenerExecutor(int port) {
return new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(),
new DefaultThreadFactory(new ThreadGroup("Listener thread group"), "HttpListener-" + this.port));
}
- /** Create the listener for request connections */
+ /**
+ * Create the listener for request connections
+ */
public IOProcessor newRequestConnectionListener(HttpConnectionFactory factory, HttpConnectionManager manager, int port) throws IOException {
return new DefaultConnectionListener(port, factory, manager);
}
- /** Create a request connection */
+ /**
+ * Create a request connection
+ */
public HttpConnectionFactory newRequestConnectionFactory(HttpParams params) {
return new DefaultHttpConnectionFactory(params);
}
- /** Create and set the parameters applied to incoming request connections */
+ /**
+ * Create and set the parameters applied to incoming request connections
+ */
public HttpParams newRequestConnectionParams() {
HttpParams params = new DefaultHttpParams();
params
@@ -227,32 +266,40 @@
return params;
}
- /** Create the connection manager used to launch request threads */
+ /**
+ * Create the connection manager used to launch request threads
+ */
public HttpConnectionManager newRequestConnectionManager(ExecutorService requestExecutor, WorkerFactory workerFactory, HttpParams params) {
return new DefaultHttpConnectionManager(configurationContext, requestExecutor, workerFactory, params);
}
- /** Create the executor use the manage request processing threads */
+ /**
+ * Create the executor use the manage request processing threads
+ */
public ExecutorService newRequestExecutor(int port) {
return new ThreadPoolExecutor(requestCoreThreadPoolSize, requestMaxThreadPoolSize, threadKeepAliveTime, threadKeepAliveTimeUnit,
newRequestBlockingQueue(),
new DefaultThreadFactory(new ThreadGroup("Connection thread group"), "HttpConnection-" + port));
}
- /** Create the queue used to hold incoming requests when requestCoreThreadPoolSize threads are busy.
+ /**
+ * Create the queue used to hold incoming requests when requestCoreThreadPoolSize threads are busy.
* Default is an unbounded queue.
*/
public BlockingQueue newRequestBlockingQueue() {
return new LinkedBlockingQueue();
}
- /** Create the factory for request workers */
+ /**
+ * Create the factory for request workers
+ */
public WorkerFactory newRequestWorkerFactory() {
- if (requestWorkerFactory!=null)
+ if (requestWorkerFactory != null) {
return requestWorkerFactory;
- else
+ } else {
return new HTTPWorkerFactory();
}
+ }
public HttpProcessor newHttpProcessor() {
BasicHttpProcessor httpProcessor = new BasicHttpProcessor();
@@ -277,65 +324,85 @@
// Getters and Setters
// *****
- /** Getter for configurationContext */
+ /**
+ * Getter for configurationContext
+ */
public ConfigurationContext getConfigurationContext() {
return configurationContext;
}
- /** Getter for httpConfiguration */
+ /**
+ * Getter for httpConfiguration
+ */
public TransportInDescription getHttpConfiguration() {
return httpConfiguration;
}
- /** Getter for port
+ /**
+ * Getter for port
* return the port on which to listen for http connections (default = 6060)
*/
public int getPort() {
return port;
}
- /** Setter for port */
+ /**
+ * Setter for port
+ */
public void setPort(int port) {
this.port = port;
}
- /** Getter for hostAddress
+ /**
+ * Getter for hostAddress
+ *
* @return the host address (or name) to be use in reply-to endpoint references, or null if not specified (default = null)
*/
public String getHostAddress() {
return hostAddress;
}
- /** Setter for hostAddress */
+ /**
+ * Setter for hostAddress
+ */
public void setHostAddress(String hostAddress) {
this.hostAddress = hostAddress;
}
- /** Getter for originServer
+ /**
+ * Getter for originServer
+ *
* @return the Server header string for outgoing messages (default "Simple-Server/1.1")
*/
public String getOriginServer() {
return originServer;
}
- /** Setter for originServer */
+ /**
+ * Setter for originServer
+ */
public void setOriginServer(String originServer) {
this.originServer = originServer;
}
- /** Getter for requestSocketTimeout
+ /**
+ * Getter for requestSocketTimeout
+ *
* @return the maximum time in millis to wait for data on a request socket (default 20000)
*/
public int getRequestSocketTimeout() {
return requestSocketTimeout;
}
- /** Setter for requestSocketTimeout */
+ /**
+ * Setter for requestSocketTimeout
+ */
public void setRequestSocketTimeout(int requestSocketTimeout) {
this.requestSocketTimeout = requestSocketTimeout;
}
- /** Getter for requestTcpNoDelay
+ /**
+ * Getter for requestTcpNoDelay
* return false iff Nagle's algorithm should be used to conserve bandwidth by minimizing segments
* at the cost of latency and performance (default true, i.e. maximize performance at
* the cost of bandwidth)
@@ -344,24 +411,32 @@
return requestTcpNoDelay;
}
- /** Setter for requestTcpNoDelay */
+ /**
+ * Setter for requestTcpNoDelay
+ */
public void setRequestTcpNoDelay(boolean requestTcpNoDelay) {
this.requestTcpNoDelay = requestTcpNoDelay;
}
- /** Getter for RequestCoreThreadPoolSize
+ /**
+ * Getter for RequestCoreThreadPoolSize
+ *
* @return the size of the thread pool use to process requests assuming there is adequate queue space (default 25)
*/
public int getRequestCoreThreadPoolSize() {
return requestCoreThreadPoolSize;
}
- /** Setter for RequestCoreThreadPoolSize */
+ /**
+ * Setter for RequestCoreThreadPoolSize
+ */
public void setRequestCoreThreadPoolSize(int requestCoreThreadPoolSize) {
this.requestCoreThreadPoolSize = requestCoreThreadPoolSize;
}
- /** Getter for requestMaxThreadPoolSize
+ /**
+ * Getter for requestMaxThreadPoolSize
+ *
* @return the maximum size of the thread pool used to process requests if the queue fills up (default 150).
* Since the default queue is unbounded this parameter is meaningless unless you override newRequestBlockingQueue()
*/
@@ -369,12 +444,16 @@
return requestMaxThreadPoolSize;
}
- /** Setter for requestMaxThreadPoolSize */
+ /**
+ * Setter for requestMaxThreadPoolSize
+ */
public void setRequestMaxThreadPoolSize(int requestMaxThreadPoolSize) {
this.requestMaxThreadPoolSize = requestMaxThreadPoolSize;
}
- /** Getter for threadKeepAliveTime
+ /**
+ * Getter for threadKeepAliveTime
+ *
* @return how long a request processing thread in excess of the core pool size will be kept alive it if is inactive
* (default with threadKeepAliveTimeUnit to 180 seconds)
*/
@@ -382,19 +461,24 @@
return threadKeepAliveTime;
}
- /** Setter for threadKeepAliveTime */
+ /**
+ * Setter for threadKeepAliveTime
+ */
public void setThreadKeepAliveTime(long threadKeepAliveTime) {
this.threadKeepAliveTime = threadKeepAliveTime;
}
- /** Getter for threadKeepAliveTimeUnit
+ /**
+ * Getter for threadKeepAliveTimeUnit
* return the time unit for threadKeepAliveTime (default SECONDS)
*/
public TimeUnit getThreadKeepAliveTimeUnit() {
return threadKeepAliveTimeUnit;
}
- /** Setter for threadKeepAliveTimeUnit */
+ /**
+ * Setter for threadKeepAliveTimeUnit
+ */
public void setThreadKeepAliveTimeUnit(TimeUnit threadKeepAliveTimeUnit) {
this.threadKeepAliveTimeUnit = threadKeepAliveTimeUnit;
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpServiceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpServiceProcessor.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpServiceProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpServiceProcessor.java Sun Feb 25 12:14:38 2007
@@ -29,10 +29,6 @@
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.ConnectionClosedException;
@@ -41,6 +37,10 @@
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpExecutionContext;
import org.apache.http.protocol.HttpService;
+
+import java.io.IOException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
/**
* I/O processor intended to process requests and fill in responses.
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpUtils.java Sun Feb 25 12:14:38 2007
@@ -27,14 +27,14 @@
*/
package org.apache.axis2.transport.http.server;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.http.Header;
+import org.apache.http.HttpRequest;
+
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;
-
-import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.http.Header;
-import org.apache.http.HttpRequest;
public class HttpUtils {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/LoggingProcessorDecorator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/LoggingProcessorDecorator.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/LoggingProcessorDecorator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/LoggingProcessorDecorator.java Sun Feb 25 12:14:38 2007
@@ -27,8 +27,6 @@
*/
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Header;
@@ -37,6 +35,8 @@
import org.apache.http.HttpResponse;
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpProcessor;
+
+import java.io.IOException;
/**
* This class wraps an arbitrary {@link HttpProcessor} and extends it with
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/OutputBuffer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/OutputBuffer.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/OutputBuffer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/OutputBuffer.java Sun Feb 25 12:14:38 2007
@@ -27,17 +27,17 @@
*/
package org.apache.axis2.transport.http.server;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
import org.apache.axis2.transport.OutTransportInfo;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.ByteArrayBuffer;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
public class OutputBuffer implements OutTransportInfo, HttpEntity {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/RequestSessionCookie.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/RequestSessionCookie.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/RequestSessionCookie.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/RequestSessionCookie.java Sun Feb 25 12:14:38 2007
@@ -29,8 +29,6 @@
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
import org.apache.axis2.Constants;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.http.Header;
@@ -39,6 +37,8 @@
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.protocol.HttpContext;
+
+import java.io.IOException;
public class RequestSessionCookie implements HttpRequestInterceptor {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/ResponseSessionCookie.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/ResponseSessionCookie.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/ResponseSessionCookie.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/ResponseSessionCookie.java Sun Feb 25 12:14:38 2007
@@ -29,8 +29,6 @@
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
import org.apache.axis2.Constants;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.transport.http.HTTPConstants;
@@ -40,6 +38,8 @@
import org.apache.http.message.BufferedHeader;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.CharArrayBuffer;
+
+import java.io.IOException;
public class ResponseSessionCookie implements HttpResponseInterceptor {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SessionManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SessionManager.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SessionManager.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SessionManager.java Sun Feb 25 12:14:38 2007
@@ -29,15 +29,15 @@
package org.apache.axis2.transport.http.server;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.context.ServiceGroupContext;
import org.apache.axis2.context.SessionContext;
import org.apache.axis2.engine.DependencyManager;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
public class SessionManager {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SimpleHttpServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SimpleHttpServer.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SimpleHttpServer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/SimpleHttpServer.java Sun Feb 25 12:14:38 2007
@@ -30,14 +30,14 @@
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.params.HttpParams;
+
+import java.io.IOException;
/**
* A simple, but configurable and extensible HTTP server.
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/Worker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/Worker.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/Worker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/Worker.java Sun Feb 25 12:14:38 2007
@@ -27,12 +27,12 @@
*/
package org.apache.axis2.transport.http.server;
-import java.io.IOException;
-
import org.apache.axis2.context.MessageContext;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
+
+import java.io.IOException;
public interface Worker {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/ComplexPart.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/ComplexPart.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/ComplexPart.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/ComplexPart.java Sun Feb 25 12:14:38 2007
@@ -18,24 +18,34 @@
import org.apache.commons.httpclient.methods.multipart.PartBase;
import org.apache.commons.httpclient.util.EncodingUtil;
-import java.io.OutputStream;
import java.io.IOException;
+import java.io.OutputStream;
public class ComplexPart extends PartBase {
- /** Default content encoding of string parameters. */
+ /**
+ * Default content encoding of string parameters.
+ */
public static final String DEFAULT_CONTENT_TYPE = "application/xml";
- /** Default charset of string parameters*/
+ /**
+ * Default charset of string parameters
+ */
public static final String DEFAULT_CHARSET = "US-ASCII";
- /** Default transfer encoding of string parameters*/
+ /**
+ * Default transfer encoding of string parameters
+ */
public static final String DEFAULT_TRANSFER_ENCODING = "8bit";
- /** Contents of this StringPart. */
+ /**
+ * Contents of this StringPart.
+ */
private byte[] content;
- /** The String value of this part. */
+ /**
+ * The String value of this part.
+ */
private String value;
/**
@@ -89,6 +99,7 @@
/**
* Writes the data to the given OutputStream.
+ *
* @param out the OutputStream to write to
* @throws IOException if there is a write error
*/
@@ -98,6 +109,7 @@
/**
* Return the length of the data.
+ *
* @return The length of the data.
* @throws IOException If an IO problem occurs
* @see org.apache.commons.httpclient.methods.multipart.Part#lengthOfData()
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java Sun Feb 25 12:14:38 2007
@@ -18,14 +18,11 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.impl.OMNodeEx;
import org.apache.axiom.om.impl.builder.StAXBuilder;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.builder.OMBuilder;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisBindingOperation;
@@ -45,15 +42,13 @@
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.ws.commons.schema.XmlSchemaElement;
-import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.stream.XMLStreamReader;
+import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.util.zip.GZIPInputStream;
import java.util.Map;
+import java.util.zip.GZIPInputStream;
/**
*
@@ -260,8 +255,7 @@
Map headers = (Map) msgCtxt.getProperty(MessageContext.TRANSPORT_HEADERS);
if (headers != null) {
if (HTTPConstants.COMPRESSION_GZIP.equals(headers.get(HTTPConstants.HEADER_CONTENT_ENCODING)) ||
- HTTPConstants.COMPRESSION_GZIP.equals(headers.get(HTTPConstants.HEADER_CONTENT_ENCODING_LOWERCASE)))
- {
+ HTTPConstants.COMPRESSION_GZIP.equals(headers.get(HTTPConstants.HEADER_CONTENT_ENCODING_LOWERCASE))) {
inputStream = new GZIPInputStream(inputStream);
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java Sun Feb 25 12:14:38 2007
@@ -15,11 +15,6 @@
*/
package org.apache.axis2.transport.http.util;
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axis2.AxisFault;
@@ -32,6 +27,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
/**
* @deprecated Since we are not using this class and this might lead to mis-use of this class, we will
* removing this class in a future release.
@@ -68,18 +67,20 @@
request.getRequestURL().toString());
Object contextWritten = null;
- if (msgContext.getOperationContext()!=null)
+ if (msgContext.getOperationContext() != null) {
contextWritten = msgContext.getOperationContext().getProperty(Constants.RESPONSE_WRITTEN);
+ }
response.setContentType("text/xml; charset="
+ msgContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
if ((contextWritten == null) || !Constants.VALUE_TRUE.equals(contextWritten)) {
Integer statusCode = (Integer) msgContext.getProperty(Constants.RESPONSE_CODE);
- if (statusCode!=null)
+ if (statusCode != null) {
response.setStatus(statusCode.intValue());
- else
+ } else {
response.setStatus(HttpServletResponse.SC_ACCEPTED);
+ }
}
boolean closeReader = true;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java Sun Feb 25 12:14:38 2007
@@ -15,20 +15,20 @@
*/
package org.apache.axis2.transport.http.util;
-import org.apache.axis2.context.MessageContext;
+import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.util.JavaUtils;
-import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.WSDL20DefaultValueHolder;
-import org.apache.axiom.om.OMElement;
+import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.util.JavaUtils;
import org.apache.woden.wsdl20.extensions.http.HTTPLocation;
import javax.xml.namespace.QName;
-import java.net.URLEncoder;
-import java.net.URL;
-import java.net.MalformedURLException;
import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Iterator;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSConnectionFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSConnectionFactory.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSConnectionFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSConnectionFactory.java Sun Feb 25 12:14:38 2007
@@ -15,10 +15,8 @@
*/
package org.apache.axis2.transport.jms;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -30,29 +28,30 @@
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
/**
* Encapsulate a JMS Connection factory definition within an Axis2.xml
- *
+ * <p/>
* More than one JMS connection factory could be defined within an Axis2 XML
* specifying the JMSListener as the transportReceiver.
- *
+ * <p/>
* These connection factories are created at the initialization of the
* transportReceiver, and any service interested in using any of these could
* specify the name of the factory and the destination through Parameters named
* JMSConstants.CONFAC_PARAM and JMSConstants.DEST_PARAM as shown below.
- *
+ * <p/>
* <parameter name="transport.jms.ConnectionFactory" locked="true">myQueueConnectionFactory</parameter>
* <parameter name="transport.jms.Destination" locked="true">TestQueue</parameter>
- *
+ * <p/>
* If a connection factory is defined by a parameter named
* JMSConstants.DEFAULT_CONFAC_NAME in the Axis2 XML, services which does not
* explicitly specify a connection factory will be defaulted to it - if it is
* defined in the Axis2 configuration.
- *
+ * <p/>
* e.g.
* <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
* <parameter name="myTopicConnectionFactory" locked="false">
@@ -79,27 +78,46 @@
private static final Log log = LogFactory.getLog(JMSConnectionFactory.class);
- /** The name used for the connection factory definition within Axis2 */
+ /**
+ * The name used for the connection factory definition within Axis2
+ */
private String name = null;
- /** The JNDI name of the actual connection factory */
+ /**
+ * The JNDI name of the actual connection factory
+ */
private String jndiName = null;
- /** A map of destinations to service names they belong to */
+ /**
+ * A map of destinations to service names they belong to
+ */
private Map destinations = null;
- /** The JMS Sessions listening for messages */
+ /**
+ * The JMS Sessions listening for messages
+ */
private Map jmsSessions = null;
- /** Properties of the connection factory */
+ /**
+ * Properties of the connection factory
+ */
private Hashtable properties = null;
- /** The JNDI Context used */
+ /**
+ * The JNDI Context used
+ */
private Context context = null;
- /** The actual ConnectionFactory instance held within */
+ /**
+ * The actual ConnectionFactory instance held within
+ */
private ConnectionFactory conFactory = null;
- /** The JMS Connection is opened. */
+ /**
+ * The JMS Connection is opened.
+ */
private Connection connection = null;
- /** The JMS Message receiver for this connection factory */
+ /**
+ * The JMS Message receiver for this connection factory
+ */
private JMSMessageReceiver msgRcvr = null;
/**
* Create a JMSConnectionFactory for the given Axis2 name and JNDI name
+ *
* @param name the local Axis2 name of the connection factory
* @param jndiName the JNDI name of the actual connection factory used
*/
@@ -113,6 +131,7 @@
/**
* Create a JMSConnectionFactory for the given Axis2 name
+ *
* @param name the local Axis2 name of the connection factory
*/
JMSConnectionFactory(String name) {
@@ -121,6 +140,7 @@
/**
* Connect to the actual JMS connection factory specified by the JNDI name
+ *
* @throws NamingException if the connection factory cannot be found
*/
public void connect() throws NamingException {
@@ -133,6 +153,7 @@
/**
* Creates the initial context using the set properties
+ *
* @throws NamingException
*/
private void createInitialContext() throws NamingException {
@@ -141,6 +162,7 @@
/**
* Set the JNDI connection factory name
+ *
* @param jndiName
*/
public void setJndiName(String jndiName) {
@@ -149,6 +171,7 @@
/**
* Add a listen destination on this connection factory on behalf of the given service
+ *
* @param destinationJndi destination JNDI name
* @param serviceName the service to which it belongs
*/
@@ -158,6 +181,7 @@
/**
* Remove listen destination on this connection factory
+ *
* @param destinationJndi the JMS destination to be removed
*/
public void removeDestination(String destinationJndi) throws JMSException {
@@ -167,6 +191,7 @@
/**
* Add a property to the connection factory
+ *
* @param key
* @param value
*/
@@ -176,6 +201,7 @@
/**
* Return the name of the connection factory
+ *
* @return the Axis2 name of this factory
*/
public String getName() {
@@ -184,6 +210,7 @@
/**
* Get the JNDI name of the actual factory
+ *
* @return the jndi name of the actual connection factory
*/
public String getJndiName() {
@@ -192,6 +219,7 @@
/**
* Get the actual underlying connection factory
+ *
* @return actual connection factory
*/
public ConnectionFactory getConFactory() {
@@ -200,6 +228,7 @@
/**
* Get the list of destinations associated with this connection factory
+ *
* @return destinations to service maping
*/
public Map getDestinations() {
@@ -208,6 +237,7 @@
/**
* Get the connection factory properties
+ *
* @return properties
*/
public Hashtable getProperties() {
@@ -218,6 +248,7 @@
* Begin listening for messages on the list of destinations associated
* with this connection factory. (Called during Axis2 initialization of
* the Transport receivers)
+ *
* @param msgRcvr the message receiver which will process received messages
* @throws JMSException on exceptions
*/
@@ -297,6 +328,7 @@
/**
* Return the service name using this destination
+ *
* @param destination the destination name
* @return the service which uses the given destination, or null
*/
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java Sun Feb 25 12:14:38 2007
@@ -15,16 +15,6 @@
*/
package org.apache.axis2.transport.jms;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
@@ -33,8 +23,8 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.SessionContext;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.SessionContext;
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.AxisServiceGroup;
@@ -47,6 +37,15 @@
import org.apache.axis2.transport.TransportListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import javax.jms.JMSException;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.StringTokenizer;
/**
* The JMS Transport listener implementation. A JMS Listner will hold one or
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSMessageReceiver.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSMessageReceiver.java Sun Feb 25 12:14:38 2007
@@ -15,28 +15,27 @@
*/
package org.apache.axis2.transport.jms;
-import java.io.InputStream;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.Topic;
-import javax.naming.Context;
-import javax.xml.stream.XMLStreamException;
-
import edu.emory.mathcs.backport.java.util.concurrent.Executor;
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ContextFactory;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.engine.AxisEngine;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.naming.Context;
+import javax.xml.stream.XMLStreamException;
+import java.io.InputStream;
+
/**
* This is the actual receiver which listens for and accepts JMS messages, and
* hands them over to be processed by a worker thread. An instance of this
@@ -47,15 +46,22 @@
private static final Log log = LogFactory.getLog(JMSMessageReceiver.class);
- /** The thread pool of workers */
+ /**
+ * The thread pool of workers
+ */
private Executor workerPool = null;
- /** The Axis configuration context */
+ /**
+ * The Axis configuration context
+ */
private ConfigurationContext axisConf = null;
- /** A reference to the JMS Connection Factory */
+ /**
+ * A reference to the JMS Connection Factory
+ */
private JMSConnectionFactory jmsConFac = null;
/**
* Create a new JMSMessage receiver
+ *
* @param jmsConFac the JMS connection factory associated with
* @param workerPool the worker thead pool to be used
* @param axisConf the Axis2 configuration
@@ -69,6 +75,7 @@
/**
* Return the Axis configuration
+ *
* @return the Axis configuration
*/
public ConfigurationContext getAxisConf() {
@@ -77,6 +84,7 @@
/**
* Set the worker thread pool
+ *
* @param workerPool the worker thead pool
*/
public void setWorkerPool(Executor workerPool) {
@@ -85,6 +93,7 @@
/**
* The entry point on the recepit of each JMS message
+ *
* @param message the JMS message received
*/
public void onMessage(Message message) {
@@ -101,6 +110,7 @@
/**
* Creates an Axis MessageContext for the received JMS message and
* sets up the transports and various properties
+ *
* @param message the JMS message
* @return the Axis MessageContext
*/
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSOutTransportInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSOutTransportInfo.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSOutTransportInfo.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSOutTransportInfo.java Sun Feb 25 12:14:38 2007
@@ -15,7 +15,9 @@
*/
package org.apache.axis2.transport.jms;
-import java.util.Hashtable;
+import org.apache.axis2.transport.OutTransportInfo;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
@@ -23,10 +25,7 @@
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
-
-import org.apache.axis2.transport.OutTransportInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.Hashtable;
/**
* The JMS OutTransportInfo
@@ -42,6 +41,7 @@
/**
* Creates an instance using the given connection factory and destination
+ *
* @param connectionFactory the connection factory
* @param dest the destination
*/
@@ -52,6 +52,7 @@
/**
* Creates and instance using the given URL
+ *
* @param url the URL
*/
JMSOutTransportInfo(String url) {
@@ -74,6 +75,7 @@
/**
* Get the referenced ConnectionFactory using the properties from the context
+ *
* @param context the context to use for lookup
* @param props the properties which contains the JNDI name of the factory
* @return the connection factory
@@ -96,6 +98,7 @@
/**
* Get the JMS destination specified by the given URL from the context
+ *
* @param context the Context to lookup
* @param url URL
* @return the JMS destination, or null if it does not exist
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java Sun Feb 25 12:14:38 2007
@@ -15,8 +15,17 @@
*/
package org.apache.axis2.transport.jms;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.transport.TransportSender;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.jms.BytesMessage;
import javax.jms.Connection;
@@ -29,18 +38,8 @@
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.xml.stream.XMLStreamException;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.handlers.AbstractHandler;
-import org.apache.axis2.transport.TransportSender;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
/**
* The TransportSender for JMS
@@ -48,8 +47,10 @@
public class JMSSender extends AbstractHandler implements TransportSender {
private static final Log log = LogFactory.getLog(JMSSender.class);
+
/**
* Performs the actual sending of the JMS message
+ *
* @param msgContext the message context to be sent
* @throws AxisFault on exception
*/
@@ -66,20 +67,17 @@
if (targetAddress != null) {
transportInfo = new JMSOutTransportInfo(targetAddress);
- }
- else if (targetAddress == null && msgContext.getTo() != null &&
+ } else if (targetAddress == null && msgContext.getTo() != null &&
!msgContext.getTo().hasAnonymousAddress()) {
targetAddress = msgContext.getTo().getAddress();
if (!msgContext.getTo().hasNoneAddress()) {
transportInfo = new JMSOutTransportInfo(targetAddress);
- }
- else {
+ } else {
//Don't send the message.
return InvocationResponse.CONTINUE;
}
- }
- else if (msgContext.isServerSide()){
+ } else if (msgContext.isServerSide()) {
// get the jms ReplyTo
transportInfo = (JMSOutTransportInfo)
msgContext.getProperty(Constants.OUT_TRANSPORT_INFO);
@@ -178,7 +176,8 @@
if (con != null) {
try {
con.close(); // closes all sessions, producers, temp Q's etc
- } catch (JMSException e) {} // ignore
+ } catch (JMSException e) {
+ } // ignore
}
}
return InvocationResponse.CONTINUE;
@@ -200,6 +199,7 @@
/**
* Create a JMS Message from the given MessageContext and using the given
* session
+ *
* @param msgContext the MessageContext
* @param session the JMS session
* @return a JMS message from the context and session
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java Sun Feb 25 12:14:38 2007
@@ -15,20 +15,6 @@
*/
package org.apache.axis2.transport.jms;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.UnsupportedEncodingException;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-import javax.xml.stream.XMLStreamException;
-
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.soap.SOAP11Constants;
@@ -36,7 +22,6 @@
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.builder.OMBuilder;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisService;
@@ -48,12 +33,26 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.jms.BytesMessage;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+import javax.xml.stream.XMLStreamException;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.StringTokenizer;
+
public class JMSUtils {
private static final Log log = LogFactory.getLog(JMSUtils.class);
/**
* Should this service be enabled on JMS transport?
+ *
* @param service the Axis service
* @return true if JMS should be enabled
*/
@@ -75,6 +74,7 @@
/**
* Get the JMS destination used by this service
+ *
* @param service the Axis Service
* @return the name of the JMS destination
*/
@@ -94,6 +94,7 @@
/**
* Extract connection factory properties from a given URL
+ *
* @param url a JMS URL of the form jms:/<destination>?[<key>=<value>&]*
* @return a Hashtable of extracted properties
*/
@@ -117,6 +118,7 @@
/**
* Marks the given service as faulty with the given comment
+ *
* @param serviceName service name
* @param msg comment for being faulty
* @param axisCfg configuration context
@@ -137,6 +139,7 @@
/**
* Get an InputStream to the message
+ *
* @param message the JMS message
* @return an InputStream
*/
@@ -184,6 +187,7 @@
/**
* Get a String property from the JMS message
+ *
* @param message JMS message
* @param property property name
* @return property value
@@ -198,6 +202,7 @@
/**
* Get the context type from the Axis MessageContext
+ *
* @param msgCtx message context
* @return the content type
*/
@@ -243,6 +248,7 @@
/**
* Get the SOAP Action from the message context
+ *
* @param msgCtx the MessageContext
* @return the SOAP Action as s String if present, or the WS-Action
*/
@@ -265,6 +271,7 @@
/**
* Return the destination name from the given URL
+ *
* @param url the URL
* @return the destination name
*/
@@ -282,11 +289,13 @@
/**
* Return a SOAPEnvelope created from the given JMS Message and Axis
* MessageContext, and the InputStream into the message
+ *
* @param message the JMS Message
* @param msgContext the Axis MessageContext
* @param in the InputStream into the message
* @return SOAPEnvelope for the message
* @throws javax.xml.stream.XMLStreamException
+ *
*/
public static SOAPEnvelope getSOAPEnvelope(
Message message, MessageContext msgContext, InputStream in)
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java Sun Feb 25 12:14:38 2007
@@ -17,8 +17,6 @@
package org.apache.axis2.transport.local;
-import java.io.OutputStream;
-
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
@@ -29,6 +27,8 @@
import org.apache.axis2.transport.TransportSender;
import org.apache.axis2.transport.TransportUtils;
import org.apache.axis2.transport.http.HTTPTransportUtils;
+
+import java.io.OutputStream;
/**
* LocalResponder
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java Sun Feb 25 12:14:38 2007
@@ -17,25 +17,24 @@
package org.apache.axis2.transport.local;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLStreamException;
-
import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ContextFactory;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.util.Builder;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
public class LocalTransportReceiver {
public static ConfigurationContext CONFIG_CONTEXT;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java Sun Feb 25 12:14:38 2007
@@ -17,12 +17,6 @@
package org.apache.axis2.transport.local;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
@@ -33,6 +27,12 @@
import org.apache.axis2.transport.TransportSender;
import org.apache.axis2.transport.TransportUtils;
import org.apache.axis2.transport.http.HTTPTransportUtils;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
public class LocalTransportSender extends AbstractHandler implements TransportSender {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EMailSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EMailSender.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EMailSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EMailSender.java Sun Feb 25 12:14:38 2007
@@ -17,9 +17,12 @@
package org.apache.axis2.transport.mail;
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStream;
-import java.util.Properties;
+import org.apache.axiom.attachments.ByteArrayDataSource;
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
import javax.activation.CommandMap;
import javax.activation.DataHandler;
@@ -38,13 +41,9 @@
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
-
-import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.util.Properties;
public class EMailSender {
private Properties properties;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EmailReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EmailReceiver.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EmailReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EmailReceiver.java Sun Feb 25 12:14:38 2007
@@ -17,7 +17,7 @@
package org.apache.axis2.transport.mail;
-import java.util.Properties;
+import org.apache.axis2.AxisFault;
import javax.mail.Folder;
import javax.mail.Message;
@@ -26,8 +26,7 @@
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.URLName;
-
-import org.apache.axis2.AxisFault;
+import java.util.Properties;
public class EmailReceiver {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailClient.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailClient.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailClient.java Sun Feb 25 12:14:38 2007
@@ -16,8 +16,8 @@
package org.apache.axis2.transport.mail;
-import java.io.IOException;
-import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.mail.Authenticator;
import javax.mail.Flags;
@@ -29,9 +29,8 @@
import javax.mail.Store;
import javax.mail.Transport;
import javax.mail.internet.MimeMessage;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.Properties;
public class MailClient extends Authenticator {
public static final int SHOW_MESSAGES = 1;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailTransportSender.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailTransportSender.java Sun Feb 25 12:14:38 2007
@@ -17,14 +17,6 @@
package org.apache.axis2.transport.mail;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.mail.PasswordAuthentication;
-
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.soap.SOAPEnvelope;
@@ -42,6 +34,13 @@
import org.apache.axis2.transport.http.HTTPTransportUtils;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.apache.axis2.util.Utils;
+
+import javax.mail.PasswordAuthentication;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
/**
* 0. For this profile we only care about SOAP 1.2
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java Sun Feb 25 12:14:38 2007
@@ -17,28 +17,10 @@
package org.apache.axis2.transport.mail;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.mail.Flags;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Multipart;
-import javax.mail.Part;
-import javax.mail.URLName;
-import javax.mail.internet.MimeMessage;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
-import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
@@ -46,8 +28,11 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.builder.OMBuilder;
-import org.apache.axis2.context.*;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ContextFactory;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.SessionContext;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
@@ -58,6 +43,22 @@
import org.apache.axis2.util.threadpool.DefaultThreadFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import javax.mail.Flags;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Multipart;
+import javax.mail.Part;
+import javax.mail.URLName;
+import javax.mail.internet.MimeMessage;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
/**
* This is the implementation for Mail Listener in Axis2. It has the full capability
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java Sun Feb 25 12:14:38 2007
@@ -16,30 +16,28 @@
package org.apache.axis2.transport.mail.server;
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-
-import javax.mail.MessagingException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-import javax.xml.namespace.QName;
-
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.builder.OMBuilder;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ContextFactory;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.transport.mail.Constants;
import org.apache.axis2.util.Builder;
import org.apache.axis2.util.MessageContextBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import javax.xml.namespace.QName;
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
/**
* This class will be used to sort the messages into normal messages and mails
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java Sun Feb 25 12:14:38 2007
@@ -16,13 +16,13 @@
package org.apache.axis2.transport.mail.server;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-
import org.apache.axis2.AxisFault;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
public class POP3Server extends Thread {
private static final Log log = LogFactory.getLog(POP3Server.class);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java Sun Feb 25 12:14:38 2007
@@ -17,6 +17,12 @@
package org.apache.axis2.transport.mail.server;
+import org.apache.axis2.transport.mail.Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.MimeMessage;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -26,13 +32,6 @@
import java.util.ArrayList;
import java.util.StringTokenizer;
-import javax.mail.MessagingException;
-import javax.mail.internet.MimeMessage;
-
-import org.apache.axis2.transport.mail.Constants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
public class POP3Worker extends Thread {
private static final Log log = LogFactory.getLog(POP3Worker.class);
boolean doneProcess = false;
@@ -77,8 +76,7 @@
int optArg = Integer.parseInt((String) tokens.get(1));
int messageArrayIndex = optArg - 1;
- if ((messageArrayIndex < messages.size()) && (messageArrayIndex >= 0))
- { // that is OK careful with numbering
+ if ((messageArrayIndex < messages.size()) && (messageArrayIndex >= 0)) { // that is OK careful with numbering
printWriter.println(Constants.OK + messageArrayIndex + 1
+ " 120"); // Mail size of 120 is just some number.
} else {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java Sun Feb 25 12:14:38 2007
@@ -17,14 +17,14 @@
package org.apache.axis2.transport.mail.server;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
public class SMTPServer extends Thread {
private static final Log log = LogFactory.getLog(SMTPServer.class);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPWorker.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPWorker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPWorker.java Sun Feb 25 12:14:38 2007
@@ -17,6 +17,17 @@
package org.apache.axis2.transport.mail.server;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.mail.Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.mail.Authenticator;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.PasswordAuthentication;
+import javax.mail.Session;
+import javax.mail.internet.MimeMessage;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
@@ -25,18 +36,6 @@
import java.net.Socket;
import java.util.ArrayList;
import java.util.Properties;
-
-import javax.mail.Authenticator;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.internet.MimeMessage;
-
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.transport.mail.Constants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
public class SMTPWorker extends Thread {
private BufferedReader reader = null;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/Storage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/Storage.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/Storage.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/Storage.java Sun Feb 25 12:14:38 2007
@@ -17,10 +17,9 @@
package org.apache.axis2.transport.mail.server;
+import javax.mail.internet.MimeMessage;
import java.util.ArrayList;
import java.util.Hashtable;
-
-import javax.mail.internet.MimeMessage;
public class Storage {
private Hashtable users = new Hashtable();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java Sun Feb 25 12:14:38 2007
@@ -17,21 +17,13 @@
package org.apache.axis2.transport.tcp;
-import java.io.File;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-
-import javax.xml.namespace.QName;
-
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.SessionContext;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.SessionContext;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.engine.ListenerManager;
@@ -40,6 +32,13 @@
import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+import java.io.File;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketException;
/**
* Class TCPServer
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPTransportSender.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPTransportSender.java Sun Feb 25 12:14:38 2007
@@ -17,14 +17,6 @@
package org.apache.axis2.transport.tcp;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.net.InetSocketAddress;
-import java.net.MalformedURLException;
-import java.net.Socket;
-import java.net.SocketAddress;
-
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
@@ -37,6 +29,14 @@
import org.apache.axis2.transport.TransportUtils;
import org.apache.axis2.transport.http.HTTPTransportUtils;
import org.apache.axis2.util.URL;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.Socket;
+import java.net.SocketAddress;
public class TCPTransportSender extends AbstractHandler implements TransportSender {
protected Writer out;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPWorker.java Sun Feb 25 12:14:38 2007
@@ -17,21 +17,13 @@
package org.apache.axis2.transport.tcp;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.net.Socket;
-
-import javax.xml.namespace.QName;
-
import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ContextFactory;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.engine.AxisConfiguration;
@@ -41,6 +33,13 @@
import org.apache.axis2.util.MessageContextBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.net.Socket;
/**
* This Class is the work hoarse of the TCP request, this process the incomming SOAP Message.
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Base64.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Base64.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Base64.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Base64.java Sun Feb 25 12:14:38 2007
@@ -16,11 +16,6 @@
package org.apache.axis2.util;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-
-
/**
* @deprecated
*/
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java?view=diff&rev=511588&r1=511587&r2=511588
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java Sun Feb 25 12:14:38 2007
@@ -1,19 +1,7 @@
package org.apache.axis2.util;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PushbackInputStream;
-import java.io.Reader;
-
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
import org.apache.axiom.attachments.Attachments;
import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.impl.MTOMConstants;
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
@@ -31,6 +19,16 @@
import org.apache.axis2.description.Parameter;
import org.apache.axis2.transport.http.HTTPConstants;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PushbackInputStream;
+import java.io.Reader;
+
public class Builder {
public static final int BOM_SIZE = 4;
@@ -275,11 +273,10 @@
}
/**
- * @deprecated If some one really need this method, please shout.
- *
* @param in
* @return
* @throws XMLStreamException
+ * @deprecated If some one really need this method, please shout.
*/
public static StAXBuilder getBuilder(Reader in) throws XMLStreamException {
XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(in);
@@ -353,6 +350,7 @@
/**
* Initial work for a builder selector which selects the builder for a given message format based on the the content type of the recieved message.
* content-type to builder mapping can be specified through the Axis2.xml.
+ *
* @param contentType
* @param msgContext
* @return the builder registered against the given content-type
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org