Package com.webmethods.jms.protocol.link
Class LinkSsl
- java.lang.Object
-
- com.webmethods.jms.protocol.link.Link
-
- com.webmethods.jms.protocol.link.LinkSsl
-
public class LinkSsl extends Link
Link implementation for SSL.
-
-
Field Summary
-
Fields inherited from class com.webmethods.jms.protocol.link.Link
_logApi, ENCRYPT_LEVEL_ENCRYPTION, ENCRYPT_LEVEL_NO_ENCRYPTION, ENCRYPT_LEVEL_US_DOMESTIC, ENCRYPT_LEVEL_US_EXPORT, SSL_PROVIDER_ENTRUST, SSL_PROVIDER_SPYRUS
-
-
Constructor Summary
Constructors Constructor Description LinkSsl(SSLInfo sslinfo)
LinkSsl(SSLInfo sslinfo, WmConnectionImpl connection)
LinkSsl(java.lang.String username, java.lang.String password, java.lang.String keystore, java.lang.String keystoretype, java.lang.String truststore, java.lang.String truststoretype, java.lang.String ciphersuites, boolean encryption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(BrokerURL url)
Create the physical connection to the Broker.void
destroy()
Cleanup any resources associated with the connection to the Broker.void
disconnect()
Close the physical connection to the Broker.void
flush()
Flushes any data in the output buffer to the socket.int
getEncryptionLevel()
Returns the encryption level of the link.java.util.Properties
getServerCertificate()
Returns properties of the server certificate.int
recv(byte[] buf, int offset, int length)
Reads bytes from the link into the specified byte array, starting at the given offset.void
send(byte[] data, int offset, int length)
Writeslength
bytes from the specified byte array starting atoffset
to the link.java.lang.String
toString()
-
Methods inherited from class com.webmethods.jms.protocol.link.Link
addFailingBrokerHost, applyJMSConfigParams, checkConnect, create
-
-
-
-
Constructor Detail
-
LinkSsl
public LinkSsl(java.lang.String username, java.lang.String password, java.lang.String keystore, java.lang.String keystoretype, java.lang.String truststore, java.lang.String truststoretype, java.lang.String ciphersuites, boolean encryption) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
LinkSsl
public LinkSsl(SSLInfo sslinfo) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
LinkSsl
public LinkSsl(SSLInfo sslinfo, WmConnectionImpl connection) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-
Method Detail
-
connect
public void connect(BrokerURL url) throws javax.jms.JMSException
Create the physical connection to the Broker.
-
disconnect
public void disconnect() throws javax.jms.JMSException
Close the physical connection to the Broker.- Specified by:
disconnect
in classLink
- Throws:
javax.jms.JMSException
- if errors occur closing the connection
-
destroy
public void destroy() throws javax.jms.JMSException
Cleanup any resources associated with the connection to the Broker.
-
send
public void send(byte[] data, int offset, int length) throws java.lang.RuntimeException
Writeslength
bytes from the specified byte array starting atoffset
to the link.
-
flush
public void flush()
Flushes any data in the output buffer to the socket.
-
recv
public int recv(byte[] buf, int offset, int length) throws javax.jms.JMSException
Reads bytes from the link into the specified byte array, starting at the given offset.- Specified by:
recv
in classLink
- Parameters:
buf
- destination buffer.offset
- offset at which to start storing byteslength
- maximum number of bytes to read- Returns:
- the number of bytes read, or
-1
if the end of the stream has been reached. - Throws:
java.lang.RuntimeException
- if an I/O error occursjavax.jms.JMSException
- if an error occurs reading from the link
-
getEncryptionLevel
public int getEncryptionLevel() throws javax.jms.JMSException
Returns the encryption level of the link.- Specified by:
getEncryptionLevel
in classLink
- Returns:
- the encryption level
- Throws:
javax.jms.JMSException
-
getServerCertificate
public java.util.Properties getServerCertificate() throws javax.jms.JMSException
Returns properties of the server certificate. The included property names are: "subjectDn", "issuerDn", "status" "serialNumber", "beginDate", "endDate".- Specified by:
getServerCertificate
in classLink
- Returns:
- server certificate properties
- Throws:
javax.jms.JMSException
- if an error occurs getting the server certificate
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-