SHOW Signed

net.rim.device.api.crypto.tls.tls10
Class TLS10Connection

java.lang.Object
  |
  +--net.rim.device.api.crypto.tls.tls10.TLS10Connection
All Implemented Interfaces:
Connection, InputConnection, OutputConnection, StreamConnection

public class TLS10Connection
extends Object
implements StreamConnection

This class can be used to instantiate a TLS1.0 connection directly given an underlying connection (such as TCP), or, it can be instantiated using Connector.open and specifying tls as the protocol to use.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0

Constructor Summary
 Category: Signed TLS10Connection(StreamConnection subConnection, String name)
          Creates an instance of the TLS protocol passing in an underlying stream connection and the address you are connecting to.
 
Method Summary
 Category: Signed  void close()
          Close the connection.
 Category: Signed  DataInputStream openDataInputStream()
          This method is used to get the data input stream where one would read the information from when it is being sent through the protocol.
 Category: Signed  DataOutputStream openDataOutputStream()
          This method is used to send information across to the other side of the connection (server) using TLS.
 Category: Signed  InputStream openInputStream()
          This method is used to get the input stream where one would read information from when it is being sent through the protocol.
 Category: Signed  OutputStream openOutputStream()
          This method is used to send information across to the other side of the connection (server) using TLS.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLS10Connection

public TLS10Connection(StreamConnection subConnection,
                       String name)
                throws IOException,
                       TLSException
Creates an instance of the TLS protocol passing in an underlying stream connection and the address you are connecting to.

This creates the protocol and calls connect which will establish the connection with the server using TLS. To use the connection call the getInputStream and getOutputStream methods.

Parameters:
subConnection - An ordered stream connection such as a TCP connection which will provide the underlying transport for this protocol.
name - The address of the server and the port that were passed into the subConnection constructor.
Throws:
IOException - Thrown if an I/O error occurs.
TLSException - Thrown if a TLS error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

openInputStream

public InputStream openInputStream()
                            throws IOException
This method is used to get the input stream where one would read information from when it is being sent through the protocol.

Specified by:
openInputStream in interface InputConnection
Returns:
The input stream to read data from.
Throws:
TLSException - Thrown if a TLS error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

openDataInputStream

public DataInputStream openDataInputStream()
                                    throws IOException
This method is used to get the data input stream where one would read the information from when it is being sent through the protocol.

Specified by:
openDataInputStream in interface InputConnection
Returns:
The data input stream to read data from.
Throws:
TLSException - Thrown if a TLS error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

openOutputStream

public OutputStream openOutputStream()
                              throws IOException
This method is used to send information across to the other side of the connection (server) using TLS.

Specified by:
openOutputStream in interface OutputConnection
Returns:
The output stream to write information to.
Throws:
TLSException - Thrown if a TLS error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

openDataOutputStream

public DataOutputStream openDataOutputStream()
                                      throws IOException
This method is used to send information across to the other side of the connection (server) using TLS.

Specified by:
openDataOutputStream in interface OutputConnection
Returns:
The data output stream to write information to.
Throws:
TLSException - Thrown if a TLS error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

close

public void close()
           throws IOException
Close the connection.

When the connection has been closed access to all methods except this one will cause an an IOException to be thrown. Closing an already closed connection has no effect. Streams derived from the connection may be open when method is called. Any open streams will cause the connection to be held open until they themselves are closed.

Specified by:
close in interface Connection
Throws:
IOException - Thrown if an I/O error occurs.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.