IP*Works! SSL V9

ipworksssl
Class Ipports

java.lang.Object
  extended by ipworksssl.Ipports

public class Ipports
extends java.lang.Object

The IPPortS Bean is a generic TCP stream client based on an asynchronous, event-driven architecture.

The IPPortS Bean is the SSL-enabled equivalent of the IP*Works! IPPort bean. The main difference is the introduction of a set of new configuration settings, properties and events that deal with SSL security. The ipworksssl.Ipports#config and {@link ipworksssl.Ipports#config configuration settings determine which protocols are enabled and at what security level. The {@link ipworksssl.Ipports#getSSLCert SSLCert} property is used to select a client certificate if the server is requesting client authentication. The {@link ipworksssl.Ipports#config configuration setting, together with the {@link ipworksssl.IpportsSSLServerAuthenticationEvent SSLServerAuthentication} event allow you to check the server identity and other security attributes. Finally, the {@link ipworksssl.IpportsSSLStatusEvent SSLStatus} event provides information about the SSL handshake.

Our main goal in designing IPPortS was ease of use. The bean has a minimum of properties and five events: {@link ipworksssl.IpportsConnectedEvent Connected} , {@link ipworksssl.IpportsDataInEvent DataIn} , {@link ipworksssl.IpportsDisconnectedEvent Disconnected} , {@link ipworksssl.IpportsReadyToSendEvent ReadyToSend} , and {@link ipworksssl.IpportsErrorEvent Error} . The events are relatively self-explanatory.

The connection is attempted by calling the {@link ipworksssl.Ipports#connect Connect} method or setting the {@link ipworksssl.Ipports#isConnected Connected} property to True, and then waiting for the {@link ipworksssl.IpportsConnectedEvent Connected} event. The destination is defined by setting {@link ipworksssl.Ipports#getRemoteHost RemoteHost} and {@link ipworksssl.Ipports#getRemotePort RemotePort} . Data is sent by calling the {@link ipworksssl.Ipports#send Send} method with Text as a parameter, or by assigning the data string to the {@link ipworksssl.Ipports#setDataToSend DataToSend} property.

To disconnect, you just call the {@link ipworksssl.Ipports#disconnect Disconnect} method or set the {@link ipworksssl.Ipports#isConnected Connected} property to False. The {@link ipworksssl.Ipports#isLinger Linger} property controls how the connection is terminated.

The operation of the bean is almost completely asynchronous. All the calls except the ones that deal with domain name resolution operate through asynchronous messages (no blocking calls). The gain in performance is considerable when compared to using blocking calls.


Field Summary
static int sslAutomatic
           
static int sslExplicit
           
static int sslImplicit
           
static int sslNone
           
 
Constructor Summary
Ipports()
          Creates an instance of Ipports Bean.
Ipports(java.lang.String runtimeLicense)
          Creates an instance of Ipports Bean with specified run-time license.
 
Method Summary
 void addIpportsEventListener(IpportsEventListener l)
           
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a {@link ipworksssl.Ipports#config configuration setting.
 void connect(java.lang.String host, int port)
          Connects to a remote host.
 void disconnect()
          Disconnects from the remote host.
 void doEvents()
          Processes events from the internal message queue.
 int getBytesSent()
          The number of bytes actually sent after an assignment to DataToSend .
 byte[] getEOL()
          Used to break the incoming data stream into chunks separated by EOL.
 Firewall getFirewall()
          A set of properties related to firewall access.
 java.lang.String getLine()
          Gets a line of text from the server.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 int getLocalPort()
          The TCP port in the local host where IPPort binds.
 java.lang.String getRemoteHost()
          The address of the remote host.
 int getRemotePort()
          The TCP port in the remote host.
 Certificate getSSLAcceptServerCert()
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 Certificate getSSLCert()
          The certificate to be used during SSL negotiation.
 Certificate getSSLServerCert()
          The server certificate for the last established connection.
 int getSSLStartMode()
          Determines how the bean starts the SSL negotiation.
 int getTimeout()
          A timeout for the bean.
 void interrupt()
          Interrupts the current action.
 boolean isAcceptData()
          Enables or disables data reception (the DataIn event).
 boolean isConnected()
          Triggers a connection or disconnection.
 boolean isKeepAlive()
          When True, KEEPALIVE packets are enabled (for long connections).
 boolean isLinger()
          When set to True, connections are terminated gracefully.
 boolean isSingleLineMode()
          Special mode for line-oriented protocols.
 void removeIpportsEventListener(IpportsEventListener l)
           
 void send(byte[] text)
          Sends data to the remote host.
 void sendFile(java.lang.String fileName)
          Sends file to the remote host.
 void sendLine(java.lang.String text)
          Sends a string followed by a newline.
 void setAcceptData(boolean acceptData)
          Enables or disables data reception (the DataIn event).
 void setConnected(boolean connected)
          Triggers a connection or disconnection.
 void setDataToSend(byte[] dataToSend)
          A string of data to be sent to the remote host.
 void setEOL(byte[] EOL)
          Used to break the incoming data stream into chunks separated by EOL.
 void setFirewall(Firewall firewall)
          A set of properties related to firewall access.
 void setKeepAlive(boolean keepAlive)
          When True, KEEPALIVE packets are enabled (for long connections).
 void setLinger(boolean linger)
          When set to True, connections are terminated gracefully.
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setLocalPort(int localPort)
          The TCP port in the local host where IPPort binds.
 void setReceiveStream(java.io.OutputStream receiveStream)
          Sets the stream to which received data will be written.
 void setRemoteHost(java.lang.String remoteHost)
          The address of the remote host.
 void setRemotePort(int remotePort)
          The TCP port in the remote host.
 void setSendStream(java.io.InputStream sendStream)
          Reads content from the stream and sends it to the server.
 void setSingleLineMode(boolean singleLineMode)
          Special mode for line-oriented protocols.
 void setSSLAcceptServerCert(Certificate SSLAcceptServerCert)
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 void setSSLCert(Certificate SSLCert)
          The certificate to be used during SSL negotiation.
 void setSSLStartMode(int SSLStartMode)
          Determines how the bean starts the SSL negotiation.
 void setTimeout(int timeout)
          A timeout for the bean.
 void startSSL()
          starts SSL negotiation on a plaintext connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sslAutomatic

public static final int sslAutomatic
See Also:
Constant Field Values

sslImplicit

public static final int sslImplicit
See Also:
Constant Field Values

sslExplicit

public static final int sslExplicit
See Also:
Constant Field Values

sslNone

public static final int sslNone
See Also:
Constant Field Values
Constructor Detail

Ipports

public Ipports()
Creates an instance of Ipports Bean.


Ipports

public Ipports(java.lang.String runtimeLicense)
Creates an instance of Ipports Bean with specified run-time license.

Method Detail

isAcceptData

public boolean isAcceptData()
Enables or disables data reception (the DataIn event).

This property enables or disables data reception (the DataIn event). Setting this property to False, temporarily disables data reception (and the DataIn event). Setting this property to True, re-enables data reception.


setAcceptData

public void setAcceptData(boolean acceptData)
                   throws IPWorksSSLException
Enables or disables data reception (the DataIn event).

This property enables or disables data reception (the DataIn event). Setting this property to False, temporarily disables data reception (and the DataIn event). Setting this property to True, re-enables data reception.

Throws:
IPWorksSSLException

getBytesSent

public int getBytesSent()
The number of bytes actually sent after an assignment to DataToSend .

This property indicates how many bytes were sent after the last assignment to DataToSend . Please check the DataToSend property for more information.


isConnected

public boolean isConnected()
Triggers a connection or disconnection.

This property triggers a connection or disconnection. Setting this property to True makes the bean attempt to connect to the host identified by the RemoteHost property. If successful, after the connection is achieved the value of the property changes to True and the Connected event is fired.

Setting this property to False closes the connection. How and when the connection is closed is controlled by the Linger property.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksSSLException
Triggers a connection or disconnection.

This property triggers a connection or disconnection. Setting this property to True makes the bean attempt to connect to the host identified by the RemoteHost property. If successful, after the connection is achieved the value of the property changes to True and the Connected event is fired.

Setting this property to False closes the connection. How and when the connection is closed is controlled by the Linger property.

Throws:
IPWorksSSLException

setDataToSend

public void setDataToSend(byte[] dataToSend)
                   throws IPWorksSSLException
A string of data to be sent to the remote host.

Assigning a string to this property makes the bean send the string to the remote host. The Send method provides similar functionality.

Throws:
IPWorksSSLException

getEOL

public byte[] getEOL()
Used to break the incoming data stream into chunks separated by EOL.

This property is used to define boundaries in the input stream using the value of the property.

This property is especially useful with ASCII files. Setting it to CRLF ("\r\ n") enables splitting of the incoming ASCII text stream into defined lines. In this case, one event is fired for each line received (as well as in packet boundaries). The CRLF ("\r\ n") bytes are discarded.

This property is a binary string. In particular, this means that it can be more than one byte long, and it can contain NULL bytes.


setEOL

public void setEOL(byte[] EOL)
            throws IPWorksSSLException
Used to break the incoming data stream into chunks separated by EOL.

This property is used to define boundaries in the input stream using the value of the property.

This property is especially useful with ASCII files. Setting it to CRLF ("\r\ n") enables splitting of the incoming ASCII text stream into defined lines. In this case, one event is fired for each line received (as well as in packet boundaries). The CRLF ("\r\ n") bytes are discarded.

This property is a binary string. In particular, this means that it can be more than one byte long, and it can contain NULL bytes.

Throws:
IPWorksSSLException

getFirewall

public Firewall getFirewall()
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.


setFirewall

public void setFirewall(Firewall firewall)
                 throws IPWorksSSLException
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.

Throws:
IPWorksSSLException

isKeepAlive

public boolean isKeepAlive()
When True, KEEPALIVE packets are enabled (for long connections).

The KeepAlive enables the SO_KEEPALIVE option on the socket. This option prevents long connections from timing out in case of inactivity.

Please note that system TCP/IP stack implementations are not required to support SO_KEEPALIVE.


setKeepAlive

public void setKeepAlive(boolean keepAlive)
                  throws IPWorksSSLException
When True, KEEPALIVE packets are enabled (for long connections).

The KeepAlive enables the SO_KEEPALIVE option on the socket. This option prevents long connections from timing out in case of inactivity.

Please note that system TCP/IP stack implementations are not required to support SO_KEEPALIVE.

Throws:
IPWorksSSLException

isLinger

public boolean isLinger()
When set to True, connections are terminated gracefully.

This property controls how a connection is closed. The default is True.

In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if {@link ipworksssl.Ipports#config is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, {@link ipworksssl.Ipports#config is a positive value, the system will attempt to send pending data until the specified {@link ipworksssl.Ipports#config is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.


setLinger

public void setLinger(boolean linger)
               throws IPWorksSSLException
When set to True, connections are terminated gracefully.

This property controls how a connection is closed. The default is True.

In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if {@link ipworksssl.Ipports#config is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, {@link ipworksssl.Ipports#config is a positive value, the system will attempt to send pending data until the specified {@link ipworksssl.Ipports#config is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

Throws:
IPWorksSSLException

getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksSSLException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

Throws:
IPWorksSSLException

getLocalPort

public int getLocalPort()
The TCP port in the local host where IPPort binds.

This property must be set before a connection is attempted. It instructs the bean to bind to a specific port (or communication endpoint) in the local machine.

Setting this property to 0 (default) enables the system to choose a port at random. The chosen port will be shown by the LocalPort property after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this property when a connection is active will generate an error.

This property is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.


setLocalPort

public void setLocalPort(int localPort)
                  throws IPWorksSSLException
The TCP port in the local host where IPPort binds.

This property must be set before a connection is attempted. It instructs the bean to bind to a specific port (or communication endpoint) in the local machine.

Setting this property to 0 (default) enables the system to choose a port at random. The chosen port will be shown by the LocalPort property after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this property when a connection is active will generate an error.

This property is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

Throws:
IPWorksSSLException

getRemoteHost

public java.lang.String getRemoteHost()
The address of the remote host. Domain names are resolved to IP addresses.

This property specifies the IP address (IP number in dotted internet format) or Domain Name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.

If this property is set to a Domain Name, a DNS request is initiated, and upon successful termination of the request, this property is set to the corresponding address. If the search is not successful, an error is returned.

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

Example (Connecting)

 IPPortControl.RemoteHost = "MyHostNameOrIP"
 IPPortControl.RemotePort = 777
 IPPortControl.Connected = true 


setRemoteHost

public void setRemoteHost(java.lang.String remoteHost)
                   throws IPWorksSSLException
The address of the remote host. Domain names are resolved to IP addresses.

This property specifies the IP address (IP number in dotted internet format) or Domain Name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.

If this property is set to a Domain Name, a DNS request is initiated, and upon successful termination of the request, this property is set to the corresponding address. If the search is not successful, an error is returned.

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

Example (Connecting)

 IPPortControl.RemoteHost = "MyHostNameOrIP"
 IPPortControl.RemotePort = 777
 IPPortControl.Connected = true 

Throws:
IPWorksSSLException

getRemotePort

public int getRemotePort()
The TCP port in the remote host.

This property specifies a service port on the remote host to connect to.

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.


setRemotePort

public void setRemotePort(int remotePort)
                   throws IPWorksSSLException
The TCP port in the remote host.

This property specifies a service port on the remote host to connect to.

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

Throws:
IPWorksSSLException

isSingleLineMode

public boolean isSingleLineMode()
Special mode for line-oriented protocols.

When this property is set to True, the bean treats the incoming data stream as lines separated by CRLF, CR, or LF. The EOL property is ignored.

AcceptData will be automatically set to False when this property is set to True. Please refer to the GetLine method for more information.


setSingleLineMode

public void setSingleLineMode(boolean singleLineMode)
                       throws IPWorksSSLException
Special mode for line-oriented protocols.

When this property is set to True, the bean treats the incoming data stream as lines separated by CRLF, CR, or LF. The EOL property is ignored.

AcceptData will be automatically set to False when this property is set to True. Please refer to the GetLine method for more information.

Throws:
IPWorksSSLException

getSSLAcceptServerCert

public Certificate getSSLAcceptServerCert()
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, this property may create a security breach. Use it at your own risk.


setSSLAcceptServerCert

public void setSSLAcceptServerCert(Certificate SSLAcceptServerCert)
                            throws IPWorksSSLException
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, this property may create a security breach. Use it at your own risk.

Throws:
IPWorksSSLException

getSSLCert

public Certificate getSSLCert()
The certificate to be used during SSL negotiation.

The digital certificate that the bean will use during SSL negotiation. Set this property to a valid certificate before starting SSL negotiation. To set a certificate, you may set the Encoded field to the encoded certificate. To select a certificate, use the store and subject fields.


setSSLCert

public void setSSLCert(Certificate SSLCert)
                throws IPWorksSSLException
The certificate to be used during SSL negotiation.

The digital certificate that the bean will use during SSL negotiation. Set this property to a valid certificate before starting SSL negotiation. To set a certificate, you may set the Encoded field to the encoded certificate. To select a certificate, use the store and subject fields.

Throws:
IPWorksSSLException

getSSLServerCert

public Certificate getSSLServerCert()
The server certificate for the last established connection.

SSLServerCert contains the server certificate for the last established connection.

SSLServerCert is reset every time a new connection is attempted.


getSSLStartMode

public int getSSLStartMode()
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.


setSSLStartMode

public void setSSLStartMode(int SSLStartMode)
                     throws IPWorksSSLException
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.

Throws:
IPWorksSSLException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the ipworksssl.Ipports#config configuration setting.

The default value for the {@link ipworksssl.Ipports#getTimeout Timeout} property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksSSLException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the ipworksssl.Ipports#config configuration setting.

The default value for the {@link ipworksssl.Ipports#getTimeout Timeout} property is 60 (seconds).

Throws:
IPWorksSSLException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksSSLException
Sets or retrieves a ipworksssl.Ipports#config configuration setting.

{@link ipworksssl.Ipports#config Config} is a generic method available in every bean. It is used to set and retrieve {@link ipworksssl.Ipports#config configuration settingsfor the bean.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the {@link ipworksssl.Ipports#config Config} method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a {@link ipworksssl.Ipports#config configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

The bean accepts one or more of the following configuration settings . Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the {@link ipworksssl.Ipports#config Config} method.

IPPort Configuration Settings

ConnectionTimeout
Sets a separate timeout value for establishing a connection
When set, this configuration setting allows you to specify a different timeout value for establishing a connection. Otherwise, the bean will use {@link ipworksssl.Ipports#getTimeout Timeout} for establishing a connection and transmitting/receiving data.
FirewallAutoDetect
Tells the bean whether or not to automatically detect and use firewall system settings, if available
This is the same as AutoDetect . This setting is provided for use by beans that do not directly expose Firewall properties.
FirewallHost
Name or IP address of firewall (optional)
If a {@link ipworksssl.Ipports#config is given, requested connections will be authenticated through the specified firewall when connecting.If the {@link ipworksssl.Ipports#config setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the {@link ipworksssl.Ipports#config setting is set to the corresponding address. If the search is not successful, an error is returned.

NOTE: This is the same as Host . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallListener
If true, the component binds to a SOCKS firewall as a server (IPPort only)
This entry is for IPPort only and does not work for other components that descend from IPPort.If this entry is set, the bean acts as a server. {@link ipworksssl.Ipports#getRemoteHost RemoteHost} and {@link ipworksssl.Ipports#getRemotePort RemotePort} are used to tell the SOCKS firewall in which address and port to listen to. The firewall rules may ignore {@link ipworksssl.Ipports#getRemoteHost RemoteHost} , and it is recommended that {@link ipworksssl.Ipports#getRemoteHost RemoteHost} be set to empty string in this case.

{@link ipworksssl.Ipports#getRemotePort RemotePort} is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The binding (address and port) is provided through the {@link ipworksssl.IpportsConnectionStatusEvent ConnectionStatus} event.

The connection to the firewall is made by calling the {@link ipworksssl.Ipports#connect Connect} method.

FirewallPassword
Password to be used if authentication is to be used when connecting through the firewall
If {@link ipworksssl.Ipports#config is specified, the {@link ipworksssl.Ipports#config and {@link ipworksssl.Ipports#config settings are used to connect and authenticate to the given firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as Password . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallPort
The TCP port for the FirewallHost;
Note that the {@link ipworksssl.Ipports#config is set automatically when {@link ipworksssl.Ipports#config is set to a valid value.NOTE: This is the same as Port . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallType
Determines the type of firewall to connect through
The appropriate values are as follows:
0
No firewall (default setting).
1
Connect through a tunneling proxy. {@link ipworksssl.Ipports#config is set to 80.
2
Connect through a SOCKS4 Proxy. {@link ipworksssl.Ipports#config is set to 1080.
3
Connect through a SOCKS5 Proxy. {@link ipworksssl.Ipports#config is set to 1080.
NOTE: This is the same as FirewallType . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallUser
A user name if authentication is to be used connecting through a firewall
If the {@link ipworksssl.Ipports#config is specified, the {@link ipworksssl.Ipports#config and {@link ipworksssl.Ipports#config settings are used to connect and authenticate to the Firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as User . This setting is provided for use by beans that do not directly expose Firewall properties.

KeepAliveTime
The inactivity time in milliseconds before a TCP keep-alive packet is sent
When set, {@link ipworksssl.Ipports#config will automatically be set to true. By default the operating system will determine the time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.Note: This value is not applicable in Java.

KeepAliveInterval
The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received
When set, {@link ipworksssl.Ipports#config will automatically be set to true. A TCP keep-alive packet will be sent after a period of inactivity as defined by {@link ipworksssl.Ipports#config . If no acknowledgement is received from the remote host the keep-alive packet will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds. This system default if this value is not specified here is 1 second.Note: This value is not applicable in Java or MAC.

Linger
When set to True, connections are terminated gracefully
This property controls how a connection is closed. The default is True.In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if {@link ipworksssl.Ipports#config is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, {@link ipworksssl.Ipports#config is a positive value, the system will attempt to send pending data until the specified {@link ipworksssl.Ipports#config is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

LingerTime
Time in seconds to have the connection linger
LingerTime is the time, in seconds, to leave the socket connection linger. This value is 0 by default, which means it will use the default IP protocol timeout.
LocalHost
The name of the local host through which connections are initiated or accepted
The {@link ipworksssl.Ipports#getLocalHost LocalHost} setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the {@link ipworksssl.Ipports#getLocalHost LocalHost} setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort
The TCP port in the local host where the bean binds
This must be set before a connection is attempted. It instructs the bean to bind to a specific port (or communication endpoint) in the local machine.Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by {@link ipworksssl.Ipports#getLocalPort LocalPort} after the connection is established.

{@link ipworksssl.Ipports#getLocalPort LocalPort} cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxLineLength
The maximum amount of data to accumulate when no EOL is found
{@link ipworksssl.Ipports#config is the size of an internal buffer, which holds received data while waiting for an {@link ipworksssl.Ipports#getEOL EOL} string.If an {@link ipworksssl.Ipports#getEOL EOL} string is found in the input stream before {@link ipworksssl.Ipports#config bytes are received, the {@link ipworksssl.IpportsDataInEvent DataIn} event is fired with the EOL parameter set to True, and the buffer is reset.

If no {@link ipworksssl.Ipports#getEOL EOL} is found, and {@link ipworksssl.Ipports#config bytes are accumulated in the buffer, the {@link ipworksssl.IpportsDataInEvent DataIn} event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for {@link ipworksssl.Ipports#config is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.

MaxTransferRate
The transfer rate limit in bytes per second
This setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default this is not set and there is no limit.
TCPKeepAlive
Determines whether or not the keep alive socket option is enabled
If set to true, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically to maintain the connection. Set {@link ipworksssl.Ipports#config and {@link ipworksssl.Ipports#config to configure the timing of the keep-alive packets.Note: This value is not applicable in Java.

UseIPv6
Whether or not to use IPv6
By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True.
CloseStreamAfterTransfer
If true, the component will close the upload or download stream after the transfer
This setting determines whether the input or output stream is closed after the transfer completes. When set to True (default), all streams will be closed after a transfer is completed. In order to keep streams open after the transfer of data, set this to False. the default value is True.
TcpNoDelay
Whether or not to delay when sending packets
When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.By default, this config is set to false.

SSL Configuration Settings

ReuseSSLSession
Determines if the SSL session is reused
If set to true, the component will reuse the context if and only if the following criteria are met:
  • The target host name is the same.
  • The system cache entry has not expired (default timeout is 10 hours).
  • The application process that calls the function is the same.
  • The logon session is the same.
  • The instance of the component is the same.

SSLCipherStrength
The minimum cipher strength used for bulk encryption
This minimum cipher strength largely dependent on the security modules installed on the system. If the cipher strength specified is not supported, an error will be returned when connections are initiated.Please note that this setting contains the minimum cipher strength requested from the security library. The actual cipher strength used for the connection is shown by the {@link ipworksssl.IpportsSSLStatusEvent SSLStatus} event.

Use this setting with caution. Requesting a lower cipher strength than necessary could potentially cause serious security vulnerabilities in your application.

When the provider is OpenSSL, SSLCipherStrength is currently not supported. This functionality is instead made available through the {@link ipworksssl.Ipports#config config setting.

SSLEnabledProtocols
Used to enable/disable the supported security protocols
Used to enable/disable the supported security protocols.Not all supported protocols are enabled by default (the value of this setting is 192). If you want more granular control over the enabled protocols, you can set this property to the binary 'OR' of one or more of the following values:
TLS1.2
3072 (Hex C00)
TLS1.1
768 (Hex 300)
TLS1
192 (Hex C0) (Default)
SSL3
48 (Hex 30)
SSL2
12 (Hex 0C)
Please note that although a number of sites still support SSL2, it is usually a good idea to disable it because of potential security vulnerabilities.

When the provider is OpenSSL, SSLCipherStrength is currently not supported. This functionality is instead made available through the {@link ipworksssl.Ipports#config config setting.

TLS 1.1 and TLS1.2 support are only available starting with Windows 7.

SSLProvider
The name of the security provider to use
Change this setting to use security providers other than the system default.Use this setting with caution. Disabling SSL security or pointing to the wrong provider could potentially cause serious security vulnerabilities in your application.

The special value "*" (default) picks the default SSL provider defined in the system.

Note: On Windows systems, the default SSL Provider is "Microsoft Unified Security Protocol Provider" and cannot be changed.

SSLSecurityFlags
Flags that control certificate verification
The following flags are defined (specified in hexadecimal notation). They can be or-ed together to exclude multiple conditions:
0x00000001
Ignore time validity status of certificate.
0x00000002
Ignore time validity status of CTL.
0x00000004
Ignore non-nested certificate times.
0x00000010
Allow unknown Certificate Authority.
0x00000020
Ignore wrong certificate usage.
0x00000100
Ignore unknown certificate revocation status.
0x00000200
Ignore unknown CTL signer revocation status.
0x00000400
Ignore unknown Certificate Authority revocation status.
0x00000800
Ignore unknown Root revocation status.
0x00008000
Allow test Root certificate.
0x00004000
Trust test Root certificate.
0x80000000
Ignore non-matching CN (certificate CN not-matching server name).
This functionality is currently not available in Java or when the provider is OpenSSL.

SSLContextProtocol
The protocol used when getting an SSLContext instance
Possible values are SSL, SSLv2, SSLv3, TLS and TLSv1. Use it only in case your security provider does not support TLS. This is the parameter "protocol" inside the SSLContext.getInstance(protocol) call.
SSLTrustManagerFactoryAlgorithm
The algorithm to be used to create a TrustManager through TrustManagerFactory
Possible values include SunX509. This is the parameter "algorithm" inside the TrustManagerFactory.getInstance(algorithm) call.
SSLEnabledCipherSuites
The cipher suite to be used in an SSL negotiation
The enabled cipher suites to be used in SSL negotiation.By default, the enabled cipher suites will include all available ciphers ("*").

The special value "*" means that the component will pick all of the supported cipher suites. If SSLEnabledCipherSuites is set to any other value, only the specified cipher suites will be considered.

Multiple cipher suites are separated by semicolons.

Example values:

 obj.config("SSLEnabledCipherSuites=*");
 obj.config("SSLEnabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA");
 obj.config("SSLEnabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA; SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"); 
Possible values include:
  • SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  • SSL_RSA_WITH_RC4_128_SHA
  • SSL_RSA_WITH_DES_CBC_SHA
  • SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DH_anon_WITH_DES_CBC_SHA
  • SSL_RSA_EXPORT_WITH_RC4_40_MD5
  • SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
  • SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
  • SSL_DHE_DSS_WITH_DES_CBC_SHA
  • SSL_RSA_WITH_NULL_MD5
  • SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
  • SSL_DHE_RSA_WITH_DES_CBC_SHA
  • SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
  • SSL_RSA_WITH_NULL_SHA
  • SSL_DH_anon_WITH_RC4_128_MD5
  • SSL_RSA_WITH_RC4_128_MD5
  • SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
  • SSL_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_NULL_SHA
  • TLS_DH_anon_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_anon_WITH_RC4_128_SHA
  • TLS_DH_anon_WITH_AES_128_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_KRB5_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_KRB5_EXPORT_WITH_RC4_40_SHA
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_RC4_128_SHA
  • TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  • TLS_ECDH_anon_WITH_NULL_SHA
  • TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_RSA_WITH_NULL_SHA256
  • TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA
  • TLS_KRB5_WITH_RC4_128_MD5
  • TLS_ECDHE_ECDSA_WITH_NULL_SHA
  • TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_RSA_WITH_RC4_128_SHA
  • TLS_EMPTY_RENEGOTIATION_INFO_SCSV
  • TLS_KRB5_WITH_3DES_EDE_CBC_MD5
  • TLS_KRB5_WITH_RC4_128_SHA
  • TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_RSA_WITH_NULL_SHA
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  • TLS_KRB5_WITH_DES_CBC_MD5
  • TLS_KRB5_EXPORT_WITH_RC4_40_MD5
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
  • TLS_ECDH_anon_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_KRB5_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_NULL_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA

SSLEnabledCipherSuites is used together with SSLCipherStrength .

Note: This configuration setting is available only in .NET and Java.

SSLAlgorithmList
A string that controls the cipher algorithms to be used by SSL
This configuration option takes a semicolon (;) delimited list of cipher algorithms to specify what algorithms may be used by SSL. This option can be used in conjunction with SSLEnabledProtocols to control which ciphers are used.For example:
 obj.Config("SSLEnabledProtocols=3072"); // TLS1.2  (supports SHA_256)
   obj.Config("SSLAlgorithmList=CALG_SHA_256;CALG_MD5"); 
Possible values include:
  • CALG_3DES
  • CALG_3DES_112
  • CALG_AES
  • CALG_AES_128
  • CALG_AES_192
  • CALG_AES_256
  • CALG_AGREEDKEY_ANY
  • CALG_CYLINK_MEK
  • CALG_DES
  • CALG_DESX
  • CALG_DH_EPHEM
  • CALG_DH_SF
  • CALG_DSS_SIGN
  • CALG_ECDH
  • CALG_ECDSA
  • CALG_ECMQV
  • CALG_HASH_REPLACE_OWF
  • CALG_HUGHES_MD5
  • CALG_HMAC
  • CALG_KEA_KEYX
  • CALG_MAC
  • CALG_MD2
  • CALG_MD4
  • CALG_MD5
  • CALG_NO_SIGN
  • CALG_OID_INFO_CNG_ONLY
  • CALG_OID_INFO_PARAMETERS
  • CALG_PCT1_MASTER
  • CALG_RC2
  • CALG_RC4
  • CALG_RC5
  • CALG_RSA_KEYX
  • CALG_RSA_SIGN
  • CALG_SCHANNEL_ENC_KEY
  • CALG_SCHANNEL_MAC_KEY
  • CALG_SCHANNEL_MASTER_HASH
  • CALG_SEAL
  • CALG_SHA
  • CALG_SHA1
  • CALG_SHA_256
  • CALG_SHA_384
  • CALG_SHA_512
  • CALG_SKIPJACK
  • CALG_SSL2_MASTER
  • CALG_SSL3_MASTER
  • CALG_SSL3_SHAMD5
  • CALG_TEK
  • CALG_TLS1_MASTER
  • CALG_TLS1PRF

This option is only valid in Windows.

Socket Configuration Settings

AbsoluteTimeout
Determines whether timeouts are inactivity timeouts or absolute timeouts
If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.Note: This option is not valid for UDP ports.

FirewallData
Used to send extra data to the firewall
When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).
InBufferSize
The size in bytes of the incoming queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize
The size in bytes of the outgoing queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

GUIAvailable
Tells the bean whether or not a message loop is available for processing events
In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events.

UseDaemonThreads
Whether threads created by the bean are daemon threads
If set to True, when the bean creates a thread the thread's Daemon property will be explicitly set to True. By default this setting is False and the bean will not set the Daemon property on the created thread.

Throws:
IPWorksSSLException

connect

public void connect(java.lang.String host,
                    int port)
             throws IPWorksSSLException
Connects to a remote host.

This method connects to a remote host. Calling this method is equivalent to setting the RemoteHost property to Host , setting RemotePort to Port , and then setting the Connected property to True.

Example (Connecting)

 IPPortControl.Connect("MyHostNameOrIP", 777) 

Throws:
IPWorksSSLException

disconnect

public void disconnect()
                throws IPWorksSSLException
Disconnects from the remote host.

This method disconnects from the remote host. Calling this method is equivalent to setting the Connected property to False.

Throws:
IPWorksSSLException

doEvents

public void doEvents()
              throws IPWorksSSLException
Processes events from the internal message queue.

When DoEvents is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.

Throws:
IPWorksSSLException

getLine

public java.lang.String getLine()
                         throws IPWorksSSLException
Gets a line of text from the server.

This method gets a line of text from the server. This method is an alternative method of receiving data for line-oriented protocols. The bean will block if necessary and then return the received line. AcceptData will be automatically set to True when the method is called, and then back to False after a line is received.

Please refer to the SingleLineMode property for more information.

Throws:
IPWorksSSLException

interrupt

public void interrupt()
               throws IPWorksSSLException
Interrupts the current action.

This method interrupts the current action. If you use SendFile to upload a file, the bean will run synchronously until the upload is completed. This method will allow you to stop the file from uploading without disconnecting from the host.

Throws:
IPWorksSSLException

send

public void send(byte[] text)
          throws IPWorksSSLException
Sends data to the remote host.

This method sends data to the remote host. Calling this method is equivalent to setting the DataToSend property to Text .

Throws:
IPWorksSSLException

sendFile

public void sendFile(java.lang.String fileName)
              throws IPWorksSSLException
Sends file to the remote host.

This method sends the specified file to the remote host the bean is connected to.

Throws:
IPWorksSSLException

sendLine

public void sendLine(java.lang.String text)
              throws IPWorksSSLException
Sends a string followed by a newline.

This method sends a string followed by a newline. This method is used for sending data with line-oriented protocols. The line is followed by CRLF ("\r\ n") .

Please refer to the GetLine method and SingleLineMode property for more information.

Throws:
IPWorksSSLException

setReceiveStream

public void setReceiveStream(java.io.OutputStream receiveStream)
                      throws IPWorksSSLException
Sets the stream to which received data will be written.

This method sets the stream to which received data will be written. The stream should be open and normally set to position 0. The bean will write all incoming data to this stream. The downloaded content will be written starting at the current position in the stream.

Throws:
IPWorksSSLException

setSendStream

public void setSendStream(java.io.InputStream sendStream)
                   throws IPWorksSSLException
Reads content from the stream and sends it to the server.

This method reads content from the stream and sends it to the server. The stream should be open and normally set to position 0. The call will return only after the end of stream has been reached. The bean will automatically close this stream if {@link ipworksssl.Ipports#config is set to true (default). The content will be read starting at the current position in the stream.

Throws:
IPWorksSSLException

startSSL

public void startSSL()
              throws IPWorksSSLException
starts SSL negotiation on a plaintext connection.

This method is used to start SSL negotiation on a plaintext connection. Please refer to the SSLStartMode property for more information.

Note that the Connected event will fire again after SSL negotiation is complete.

Throws:
IPWorksSSLException

addIpportsEventListener

public void addIpportsEventListener(IpportsEventListener l)
                             throws java.util.TooManyListenersException
Throws:
java.util.TooManyListenersException

removeIpportsEventListener

public void removeIpportsEventListener(IpportsEventListener l)

IP*Works! SSL V9

Copyright (c) 2015 /n software inc. - All rights reserved.