Package com.webmethods.jms.protocol.link
Class LinkTcp
- java.lang.Object
-
- com.webmethods.jms.protocol.link.Link
-
- com.webmethods.jms.protocol.link.LinkTcp
-
public class LinkTcp extends Link
Link implementation for TCP.
-
-
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 LinkTcp()
Create a new TCP link.
-
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.-
Methods inherited from class com.webmethods.jms.protocol.link.Link
addFailingBrokerHost, applyJMSConfigParams, checkConnect, create
-
-
-
-
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.io.IOException
Writeslength
bytes from the specified byte array starting atoffset
to the link.
-
flush
public void flush() throws java.io.IOException
Flushes any data in the output buffer to the socket.
-
recv
public int recv(byte[] buf, int offset, int length) throws java.io.IOException
Reads bytes from the link into the specified byte array, starting at the given offset.
-
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
- if an error occurs getting the encryption level
-
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
-
-