[java-opensaml COMMIT] /trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java
noreply at shibboleth.net
noreply at shibboleth.net
Fri May 1 20:53:41 EDT 2015
Author: putmanb
Date: Fri May 1 20:53:39 2015
New Revision: 4264
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4264&view=rev
Log:
Add some missing component lifecycle checks on setters, and a doDestroy().
Modified:
trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java
Modified: trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java?rev=4264&r1=4263&r2=4264&view=diff
==============================================================================
--- trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java (original)
+++ trunk/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineHttpSOAPClient.java Fri May 1 20:53:39 2015
@@ -116,6 +116,18 @@
}
}
+ /** {@inheritDoc} */
+ @Override
+ protected void doDestroy() {
+ httpClient = null;
+ pipelineFactory = null;
+ pipelineName = null;
+ credentialsProvider = null;
+ tlsTrustEngine = null;
+
+ super.doDestroy();
+ }
+
/**
* Flag indicating whether presence of a pipeline factory instance is required at init time.
*
@@ -131,6 +143,9 @@
* @param flag the flag value
*/
public void setInitRequiresPipelineFactory(boolean flag) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
+
initRequiresPipelineFactory = flag;
}
@@ -144,6 +159,7 @@
*/
public void setHttpClient(@Nonnull final HttpClient client) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
httpClient = Constraint.isNotNull(client, "HttpClient cannot be null");
}
@@ -156,6 +172,7 @@
public void setPipelineFactory(
@Nonnull final HttpClientMessagePipelineFactory<InboundMessageType, OutboundMessageType> factory) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
pipelineFactory = Constraint.isNotNull(factory, "HttpClientPipelineFactory cannot be null");
}
@@ -171,6 +188,9 @@
* @param name the pipeline name, or null
*/
public void setPipelineName(@Nullable final String name) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
+
pipelineName = StringSupport.trimOrNull(name);
}
@@ -187,6 +207,9 @@
* @param engine the trust engine instance to use
*/
public void setTLSTrustEngine(@Nullable final TrustEngine<? super X509Credential> engine) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
+
tlsTrustEngine = engine;
}
More information about the commits
mailing list