org.wildfly.swarm.config.elytron.SslSession Maven / Gradle / Ivy
The newest version!
package org.wildfly.swarm.config.elytron;
import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Addresses;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;
import java.util.List;
import java.util.Map;
import java.util.Arrays;
import java.util.stream.Collectors;
/**
* A currently established SSL session.
*/
@Addresses({"/subsystem=elytron/client-ssl-context=*/ssl-session=*",
"/subsystem=elytron/server-ssl-context=*/ssl-session=*"})
@ResourceType("ssl-session")
public class SslSession>
implements
org.wildfly.swarm.config.runtime.Keyed {
private String key;
private PropertyChangeSupport pcs;
@AttributeDocumentation("The application buffer size as reported by the SSLSession.")
private Integer applicationBufferSize;
@AttributeDocumentation("The selected cipher suite as reported by the SSLSession.")
private String cipherSuite;
@AttributeDocumentation("The creation time as reported by the SSLSession.")
private String creationTime;
@AttributeDocumentation("The last accessed time as reported by the SSLSession.")
private String lastAccessedTime;
@AttributeDocumentation("The local certificates from the SSLSession.")
private List localCertificates;
@AttributeDocumentation("The local principal as reported by the SSLSession.")
private String localPrincipal;
@AttributeDocumentation("The packet buffer size as reported by the SSLSession.")
private Integer packetBufferSize;
@AttributeDocumentation("The peer certificates from the SSLSession.")
private List peerCertificates;
@AttributeDocumentation("The peer host as reported by the SSLSession.")
private String peerHost;
@AttributeDocumentation("The peer port as reported by the SSLSession.")
private Integer peerPort;
@AttributeDocumentation("The peer principal as reported by the SSLSession.")
private String peerPrincipal;
@AttributeDocumentation("The protocol as reported by the SSLSession.")
private String protocol;
@AttributeDocumentation("The validity of the session as reported by the SSLSession.")
private Boolean valid;
public SslSession(java.lang.String key) {
super();
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Adds a property change listener
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (null == this.pcs)
this.pcs = new PropertyChangeSupport(this);
this.pcs.addPropertyChangeListener(listener);
}
/**
* Removes a property change listener
*/
public void removePropertyChangeListener(
java.beans.PropertyChangeListener listener) {
if (this.pcs != null)
this.pcs.removePropertyChangeListener(listener);
}
/**
* The application buffer size as reported by the SSLSession.
*/
@ModelNodeBinding(detypedName = "application-buffer-size")
public Integer applicationBufferSize() {
return this.applicationBufferSize;
}
/**
* The application buffer size as reported by the SSLSession.
*/
@SuppressWarnings("unchecked")
public T applicationBufferSize(java.lang.Integer value) {
Object oldValue = this.applicationBufferSize;
this.applicationBufferSize = value;
if (this.pcs != null)
this.pcs.firePropertyChange("applicationBufferSize", oldValue,
value);
return (T) this;
}
/**
* The selected cipher suite as reported by the SSLSession.
*/
@ModelNodeBinding(detypedName = "cipher-suite")
public String cipherSuite() {
return this.cipherSuite;
}
/**
* The selected cipher suite as reported by the SSLSession.
*/
@SuppressWarnings("unchecked")
public T cipherSuite(java.lang.String value) {
Object oldValue = this.cipherSuite;
this.cipherSuite = value;
if (this.pcs != null)
this.pcs.firePropertyChange("cipherSuite", oldValue, value);
return (T) this;
}
/**
* The creation time as reported by the SSLSession.
*/
@ModelNodeBinding(detypedName = "creation-time")
public String creationTime() {
return this.creationTime;
}
/**
* The creation time as reported by the SSLSession.
*/
@SuppressWarnings("unchecked")
public T creationTime(java.lang.String value) {
Object oldValue = this.creationTime;
this.creationTime = value;
if (this.pcs != null)
this.pcs.firePropertyChange("creationTime", oldValue, value);
return (T) this;
}
/**
* The last accessed time as reported by the SSLSession.
*/
@ModelNodeBinding(detypedName = "last-accessed-time")
public String lastAccessedTime() {
return this.lastAccessedTime;
}
/**
* The last accessed time as reported by the SSLSession.
*/
@SuppressWarnings("unchecked")
public T lastAccessedTime(java.lang.String value) {
Object oldValue = this.lastAccessedTime;
this.lastAccessedTime = value;
if (this.pcs != null)
this.pcs.firePropertyChange("lastAccessedTime", oldValue, value);
return (T) this;
}
/**
* The local certificates from the SSLSession.
*/
@ModelNodeBinding(detypedName = "local-certificates")
public List