Changed @since 1.1.0 to @since 1.5.0

This commit is contained in:
Arjen Poutsma
2007-11-14 20:18:39 +00:00
parent 7097746897
commit 277e465d97
34 changed files with 184 additions and 99 deletions

View File

@@ -22,14 +22,13 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.core.JdkVersion;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;sws:marshalling-endpoints/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {

View File

@@ -23,7 +23,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
* {@link NamespaceHandler} for the '<code>sws</code>' namespace.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class SwsNamespaceHandler extends NamespaceHandlerSupport {

View File

@@ -24,14 +24,13 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;sws:xpath-endpoints/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class XPathEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {

View File

@@ -45,7 +45,7 @@ import javax.xml.namespace.QName;
* @author Arjen Poutsma
* @author Alex Marshall
* @see #setLocationUri(String)
* @since 1.1.0
* @since 1.5.0
*/
public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBindingWsdl4jDefinitionBuilder {
@@ -53,7 +53,9 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
private static final String WSDL_SOAP_PREFIX = "soap12";
/** The default soap12:binding transport attribute value. */
/**
* The default soap12:binding transport attribute value.
*/
public static final String DEFAULT_TRANSPORT_URI = "http://schemas.xmlsoap.org/soap/http";
private String transportUri = DEFAULT_TRANSPORT_URI;
@@ -70,12 +72,16 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
this.transportUri = transportUri;
}
/** Sets the value used for the soap12:address location attribute value. */
/**
* Sets the value used for the soap12:address location attribute value.
*/
public void setLocationUri(String locationUri) {
this.locationUri = locationUri;
}
/** Adds the WSDL SOAP namespace to the definition. */
/**
* Adds the WSDL SOAP namespace to the definition.
*/
protected void populateDefinition(Definition definition) throws WSDLException {
definition.addNamespace(WSDL_SOAP_PREFIX, WSDL_SOAP_NAMESPACE_URI);
}

View File

@@ -81,27 +81,39 @@ import org.xml.sax.SAXException;
* @see #setPortTypeName(String)
* @see #setRequestSuffix(String)
* @see #setResponseSuffix(String)
* @since 1.1.0
* @since 1.5.0
*/
public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jDefinitionBuilder
implements InitializingBean {
/** The default suffix used to detect request elements in the schema. */
/**
* The default suffix used to detect request elements in the schema.
*/
public static final String DEFAULT_REQUEST_SUFFIX = "Request";
/** The default suffix used to detect response elements in the schema. */
/**
* The default suffix used to detect response elements in the schema.
*/
public static final String DEFAULT_RESPONSE_SUFFIX = "Response";
/** The default suffix used to detect fault elements in the schema. */
/**
* The default suffix used to detect fault elements in the schema.
*/
public static final String DEFAULT_FAULT_SUFFIX = "Fault";
/** The default prefix used to register the schema namespace in the WSDL. */
/**
* The default prefix used to register the schema namespace in the WSDL.
*/
public static final String DEFAULT_SCHEMA_PREFIX = "schema";
/** The default prefix used to register the target namespace in the WSDL. */
/**
* The default prefix used to register the target namespace in the WSDL.
*/
public static final String DEFAULT_PREFIX = "tns";
/** The suffix used to create a service name from a port type name. */
/**
* The suffix used to create a service name from a port type name.
*/
public static final String SERVICE_SUFFIX = "Service";
private Resource schemaResource;
@@ -153,12 +165,16 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
this.faultSuffix = faultSuffix;
}
/** Sets the port type name used for this definition. Required. */
/**
* Sets the port type name used for this definition. Required.
*/
public void setPortTypeName(String portTypeName) {
this.portTypeName = portTypeName;
}
/** Sets the target namespace used for this definition. */
/**
* Sets the target namespace used for this definition.
*/
public void setTargetNamespace(String targetNamespace) {
this.targetNamespace = targetNamespace;
}
@@ -181,7 +197,9 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
this.prefix = prefix;
}
/** Sets the XSD schema to use for generating the WSDL. */
/**
* Sets the XSD schema to use for generating the WSDL.
*/
public void setSchema(Resource schemaResource) {
Assert.notNull(schemaResource, "'schema' must not be null");
Assert.isTrue(schemaResource.exists(), "schema \"" + schemaResource + "\" does not exit");
@@ -214,7 +232,9 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
}
}
/** Adds the target namespace and schema namespace to the definition. */
/**
* Adds the target namespace and schema namespace to the definition.
*/
protected void populateDefinition(Definition definition) throws WSDLException {
super.populateDefinition(definition);
definition.setTargetNamespace(targetNamespace);
@@ -224,7 +244,9 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
}
}
/** Does nothing. */
/**
* Does nothing.
*/
protected void buildImports(Definition definition) throws WSDLException {
}
@@ -495,7 +517,9 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
operation.setName(operationName);
}
/** Sets the name of the service to the name of the port type, with "Service" appended to it. */
/**
* Sets the name of the service to the name of the port type, with "Service" appended to it.
*/
protected void populateService(Service service) throws WSDLException {
service.setQName(new QName(targetNamespace, portTypeName + SERVICE_SUFFIX));
}

View File

@@ -24,10 +24,6 @@ import org.springframework.oxm.Marshaller;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.XmlMappingException;
/**
* @author Arjen Poutsma
* @since 1.1.0
*/
public class DummyMarshaller implements Marshaller, Unmarshaller {
public void marshal(Object graph, Result result) throws XmlMappingException, IOException {

View File

@@ -6,14 +6,13 @@ package org.springframework.oxm.config;
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
import org.springframework.oxm.jaxb.Jaxb1Marshaller;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;oxm:jaxb1-marshaller/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class Jaxb1MarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {

View File

@@ -25,14 +25,13 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;oxm:jaxb2-marshaller/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class Jaxb2MarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {

View File

@@ -6,14 +6,13 @@ package org.springframework.oxm.config;
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
import org.springframework.oxm.jibx.JibxMarshaller;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;oxm:jibx-marshaller/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class JibxMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {

View File

@@ -11,7 +11,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
* {@link NamespaceHandler} for the '<code>oxm</code>' namespace.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class OxmNamespaceHandler extends NamespaceHandlerSupport {

View File

@@ -9,14 +9,13 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.oxm.xmlbeans.XmlBeansMarshaller;
import org.springframework.util.StringUtils;
import org.w3c.dom.Element;
/**
* Parser for the <code>&lt;oxm:xmlbeans-marshaller/&gt; element.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class XmlBeansMarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {

View File

@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* Input stream that wraps a {@link BytesMessage}.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class BytesMessageInputStream extends InputStream {

View File

@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* Output stream that wraps a {@link BytesMessage}.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
class BytesMessageOutputStream extends OutputStream {

View File

@@ -31,7 +31,7 @@ import org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverO
* Used by {@link WebServiceMessageListener} and {@link WebServiceMessageDrivenBean}.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class JmsMessageReceiver extends SimpleWebServiceMessageReceiverObjectSupport {

View File

@@ -65,11 +65,13 @@ import org.springframework.ws.transport.jms.support.JmsTransportUtils;
* @author Arjen Poutsma
* @see <a href="http://www.ietf.org/internet-drafts/draft-merrick-jms-iri-00.txt">IRI Scheme for Java(tm) Message
* Service 1.0</a>
* @since 1.1.0
* @since 1.5.0
*/
public class JmsMessageSender extends JmsDestinationAccessor implements WebServiceMessageSender {
/** Default timeout for receive operations: -1 indicates a blocking receive without timeout. */
/**
* Default timeout for receive operations: -1 indicates a blocking receive without timeout.
*/
public static final long DEFAULT_RECEIVE_TIMEOUT = -1;
private long receiveTimeout = DEFAULT_RECEIVE_TIMEOUT;

View File

@@ -38,7 +38,7 @@ import org.springframework.ws.transport.support.EnumerationIterator;
* BytesMessage} request and response message.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class JmsReceiverConnection extends AbstractReceiverConnection implements WebServiceConnection {
@@ -48,7 +48,9 @@ public class JmsReceiverConnection extends AbstractReceiverConnection implements
private BytesMessage responseMessage;
/** Constructs a new JMS connection with the given parameters. */
/**
* Constructs a new JMS connection with the given parameters.
*/
protected JmsReceiverConnection(BytesMessage requestMessage, Session session) {
Assert.notNull(requestMessage, "requestMessage must not be null");
Assert.notNull(session, "session must not be null");
@@ -56,12 +58,16 @@ public class JmsReceiverConnection extends AbstractReceiverConnection implements
this.session = session;
}
/** Returns the request message for this connection. */
/**
* Returns the request message for this connection.
*/
public BytesMessage getRequestMessage() {
return requestMessage;
}
/** Returns the response message, if any, for this connection. */
/**
* Returns the response message, if any, for this connection.
*/
public BytesMessage getResponseMessage() {
return responseMessage;
}

View File

@@ -44,7 +44,7 @@ import org.springframework.ws.transport.support.EnumerationIterator;
* BytesMessage} request and response message.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class JmsSenderConnection extends AbstractSenderConnection implements WebServiceConnection {
@@ -70,7 +70,9 @@ public class JmsSenderConnection extends AbstractSenderConnection implements Web
private int priority;
/** Constructs a new JMS connection with the given parameters. */
/**
* Constructs a new JMS connection with the given parameters.
*/
protected JmsSenderConnection(ConnectionFactory connectionFactory,
Connection connection,
Session session,
@@ -84,12 +86,16 @@ public class JmsSenderConnection extends AbstractSenderConnection implements Web
this.requestDestination = requestDestination;
}
/** Returns the request message for this connection. */
/**
* Returns the request message for this connection.
*/
public BytesMessage getRequestMessage() {
return requestMessage;
}
/** Returns the response message, if any, for this connection. */
/**
* Returns the response message, if any, for this connection.
*/
public BytesMessage getResponseMessage() {
return responseMessage;
}

View File

@@ -22,11 +22,13 @@ import org.springframework.ws.transport.TransportConstants;
* Declares JMS-specific transport constants.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public interface JmsTransportConstants extends TransportConstants {
/** The "jms" URI scheme" */
/**
* The "jms" URI scheme"
*/
String JMS_URI_SCHEME = "jms";
}

View File

@@ -24,7 +24,7 @@ import org.springframework.ws.transport.TransportException;
* Exception that is thrown when an error occurs in the JMS transport.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class JmsTransportException extends TransportException {

View File

@@ -36,7 +36,7 @@ import org.springframework.ws.transport.WebServiceMessageReceiver;
* @author Arjen Poutsma
* @see #setMessageFactory(org.springframework.ws.WebServiceMessageFactory)
* @see #setMessageReceiver(org.springframework.ws.transport.WebServiceMessageReceiver)
* @since 1.1.0
* @since 1.5.0
*/
public class WebServiceMessageListener extends JmsMessageReceiver implements SessionAwareMessageListener {

View File

@@ -28,7 +28,7 @@ import javax.jms.Message;
* URI}.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class JmsTransportUtils {

View File

@@ -49,7 +49,7 @@ import org.springframework.ws.transport.support.AbstractAsyncStandaloneMessageRe
* {@link PollingMonitoringStrategy} for IMAP servers.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class MailMessageReceiver extends AbstractAsyncStandaloneMessageReceiver {
@@ -67,7 +67,9 @@ public class MailMessageReceiver extends AbstractAsyncStandaloneMessageReceiver
private MonitoringStrategy monitoringStrategy;
/** Sets the from address to use when sending reponse messages. */
/**
* Sets the from address to use when sending reponse messages.
*/
public void setFrom(String from) throws AddressException {
this.from = new InternetAddress(from);
}

View File

@@ -57,11 +57,13 @@ import org.springframework.ws.transport.mail.support.MailTransportUtils;
*
* @author Arjen Poutsma
* @see <a href="http://www.ietf.org/rfc/rfc2368.txt">The mailto URL scheme</a>
* @since 1.1.0
* @since 1.5.0
*/
public class MailMessageSender implements WebServiceMessageSender, InitializingBean {
/** Default timeout for receive operations. Set to 1000 * 60 milliseconds (i.e. 1 minute). */
/**
* Default timeout for receive operations. Set to 1000 * 60 milliseconds (i.e. 1 minute).
*/
public static final long DEFAULT_RECEIVE_TIMEOUT = 1000 * 60;
private long receiveSleepTime = DEFAULT_RECEIVE_TIMEOUT;
@@ -74,7 +76,9 @@ public class MailMessageSender implements WebServiceMessageSender, InitializingB
private InternetAddress from;
/** Sets the from address to use when sending request messages. */
/**
* Sets the from address to use when sending request messages.
*/
public void setFrom(String from) throws AddressException {
this.from = new InternetAddress(from);
}

View File

@@ -48,7 +48,7 @@ import org.springframework.ws.transport.mail.support.MailTransportUtils;
* request and response message.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class MailReceiverConnection extends AbstractReceiverConnection {
@@ -66,7 +66,9 @@ public class MailReceiverConnection extends AbstractReceiverConnection {
private InternetAddress from;
/** Constructs a new Mail connection with the given parameters. */
/**
* Constructs a new Mail connection with the given parameters.
*/
protected MailReceiverConnection(Message requestMessage, Session session) {
Assert.notNull(requestMessage, "'requestMessage' must not be null");
Assert.notNull(session, "'session' must not be null");
@@ -74,12 +76,16 @@ public class MailReceiverConnection extends AbstractReceiverConnection {
this.session = session;
}
/** Returns the request message for this connection. */
/**
* Returns the request message for this connection.
*/
public Message getRequestMessage() {
return requestMessage;
}
/** Returns the response message, if any, for this connection. */
/**
* Returns the response message, if any, for this connection.
*/
public Message getResponseMessage() {
return responseMessage;
}

View File

@@ -43,6 +43,8 @@ import javax.mail.internet.MimeMessage;
import javax.mail.search.HeaderTerm;
import javax.mail.search.SearchTerm;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.transport.AbstractSenderConnection;
@@ -50,15 +52,12 @@ import org.springframework.ws.transport.TransportConstants;
import org.springframework.ws.transport.WebServiceConnection;
import org.springframework.ws.transport.mail.support.MailTransportUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Implementation of {@link WebServiceConnection} that is used for client-side Mail access. Exposes a {@link Message}
* request and response message.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class MailSenderConnection extends AbstractSenderConnection {
@@ -93,7 +92,9 @@ public class MailSenderConnection extends AbstractSenderConnection {
private Folder folder;
/** Constructs a new Mail connection with the given parameters. */
/**
* Constructs a new Mail connection with the given parameters.
*/
protected MailSenderConnection(Session session,
URLName transportUri,
URLName storeUri,
@@ -110,12 +111,16 @@ public class MailSenderConnection extends AbstractSenderConnection {
this.receiveTimeout = receiveTimeout;
}
/** Returns the request message for this connection. */
/**
* Returns the request message for this connection.
*/
public Message getRequestMessage() {
return requestMessage;
}
/** Returns the response message, if any, for this connection. */
/**
* Returns the response message, if any, for this connection.
*/
public Message getResponseMessage() {
return responseMessage;
}

View File

@@ -22,13 +22,17 @@ import org.springframework.ws.transport.TransportConstants;
* Declares Mail-specific transport constants.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public interface MailTransportConstants extends TransportConstants {
/** The "mail" URI scheme. */
/**
* The "mail" URI scheme.
*/
String MAIL_URI_SCHEME = "mailto";
/** The "In-Reply-To" header. */
/**
* The "In-Reply-To" header.
*/
String HEADER_IN_REPLY_TO = "In-Reply-To";
}

View File

@@ -24,7 +24,7 @@ import org.springframework.ws.transport.TransportException;
* Exception that is thrown when an error occurs in the Mail transport.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class MailTransportException extends TransportException {

View File

@@ -33,11 +33,13 @@ import org.apache.commons.logging.LogFactory;
* deleteMessages} property, and includes a basic workflow for message monitoring.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public abstract class AbstractMonitoringStrategy implements MonitoringStrategy {
/** Logger available to subclasses. */
/**
* Logger available to subclasses.
*/
protected final Log logger = LogFactory.getLog(getClass());
private boolean deleteMessages = true;

View File

@@ -23,9 +23,8 @@ import javax.mail.event.MessageCountAdapter;
import javax.mail.event.MessageCountEvent;
import javax.mail.event.MessageCountListener;
import org.springframework.util.Assert;
import com.sun.mail.imap.IMAPFolder;
import org.springframework.util.Assert;
/**
* Implementation of the {@link MonitoringStrategy} interface that uses the IMAP IDLE command for asynchronous message
@@ -35,7 +34,7 @@ import com.sun.mail.imap.IMAPFolder;
* Additionally, this strategy requires JavaMail version 1.4.1.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class ImapIdleMonitoringStrategy extends AbstractMonitoringStrategy {

View File

@@ -27,11 +27,13 @@ import javax.mail.MessagingException;
* Pop3PollingMonitoringStrategy} instead.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class PollingMonitoringStrategy extends AbstractMonitoringStrategy {
/** Defines the default polling frequency. Set to 1000 * 60 milliseconds (i.e. 1 minute). */
/**
* Defines the default polling frequency. Set to 1000 * 60 milliseconds (i.e. 1 minute).
*/
public static final long DEFAULT_POLLING_FREQUENCY = 1000 * 60;
private long pollingInterval = DEFAULT_POLLING_FREQUENCY;

View File

@@ -33,7 +33,7 @@ import org.springframework.ws.transport.mail.support.MailTransportUtils;
* deleted.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public class Pop3PollingMonitoringStrategy extends PollingMonitoringStrategy {
@@ -44,14 +44,18 @@ public class Pop3PollingMonitoringStrategy extends PollingMonitoringStrategy {
public void setDeleteMessages(boolean deleteMessages) {
}
/** Re-opens the folder, if it closed. */
/**
* Re-opens the folder, if it closed.
*/
protected void afterSleep(Folder folder) throws MessagingException {
if (!folder.isOpen()) {
folder.open(Folder.READ_WRITE);
}
}
/** Simply returns {@link Folder#getMessages()}. */
/**
* Simply returns {@link Folder#getMessages()}.
*/
protected Message[] searchForNewMessages(Folder folder) throws MessagingException {
return folder.getMessages();
}

View File

@@ -28,16 +28,15 @@ import javax.mail.URLName;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import org.springframework.util.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.StringUtils;
/**
* Collection of utility methods to work with Mail transports.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public abstract class MailTransportUtils {
@@ -124,7 +123,9 @@ public abstract class MailTransportUtils {
}
}
/** Returns a string representation of the given {@link URLName}, where the password has been protected. */
/**
* Returns a string representation of the given {@link URLName}, where the password has been protected.
*/
public static String toPasswordProtectedString(URLName name) {
String protocol = name.getProtocol();
String username = name.getUsername();

View File

@@ -24,7 +24,7 @@ import org.springframework.context.Lifecycle;
* the {@link Lifecycle} interface, and various template methods to be implemented by concrete sub classes.
*
* @author Arjen Poutsma
* @since 1.1.0
* @since 1.5.0
*/
public abstract class AbstractStandaloneMessageReceiver extends SimpleWebServiceMessageReceiverObjectSupport
implements Lifecycle, DisposableBean {
@@ -37,14 +37,18 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
private final Object lifecycleMonitor = new Object();
/** Return whether this server is currently active, that is, whether it has been set up but not shut down yet. */
/**
* Return whether this server is currently active, that is, whether it has been set up but not shut down yet.
*/
public final boolean isActive() {
synchronized (lifecycleMonitor) {
return active;
}
}
/** Return whether this server is currently running, that is, whether it has been started and not stopped yet. */
/**
* Return whether this server is currently running, that is, whether it has been started and not stopped yet.
*/
public final boolean isRunning() {
synchronized (lifecycleMonitor) {
return running;
@@ -60,12 +64,16 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
this.autoStartup = autoStartup;
}
/** Calls {@link #activate()} when the BeanFactory initializes the receiver instance. */
/**
* Calls {@link #activate()} when the BeanFactory initializes the receiver instance.
*/
public void afterPropertiesSet() throws Exception {
activate();
}
/** Calls {@link #shutdown()} when the BeanFactory destroys the receiver instance. */
/**
* Calls {@link #shutdown()} when the BeanFactory destroys the receiver instance.
*/
public void destroy() {
shutdown();
}
@@ -85,7 +93,9 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
}
}
/** Start this server. */
/**
* Start this server.
*/
public final void start() {
synchronized (lifecycleMonitor) {
running = true;
@@ -94,7 +104,9 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
onStart();
}
/** Stop this server. */
/**
* Stop this server.
*/
public final void stop() {
synchronized (lifecycleMonitor) {
running = false;
@@ -103,7 +115,9 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
onStop();
}
/** Shut down this server. */
/**
* Shut down this server.
*/
public final void shutdown() {
synchronized (lifecycleMonitor) {
running = false;
@@ -120,12 +134,18 @@ public abstract class AbstractStandaloneMessageReceiver extends SimpleWebService
*/
protected abstract void onActivate() throws Exception;
/** Template method invoked when {@link #start()} is invoked. */
/**
* Template method invoked when {@link #start()} is invoked.
*/
protected abstract void onStart();
/** Template method invoked when {@link #stop()} is invoked. */
/**
* Template method invoked when {@link #stop()} is invoked.
*/
protected abstract void onStop();
/** Template method invoked when {@link #shutdown()} is invoked. */
/**
* Template method invoked when {@link #shutdown()} is invoked.
*/
protected abstract void onShutdown();
}

View File

@@ -26,7 +26,7 @@ import org.springframework.ws.transport.WebServiceMessageReceiver;
*
* @author Arjen Poutsma
* @see #handleConnection(WebServiceConnection)
* @since 1.1.0
* @since 1.5.0
*/
public abstract class SimpleWebServiceMessageReceiverObjectSupport extends WebServiceMessageReceiverObjectSupport
implements InitializingBean {