gnu.crypto.tool

Class SaslConnection

public class SaslConnection extends Object

A sample client-side protocol driver.

Version: $Revision: 1.5 $

Constructor Summary
SaslConnection(String m, URL url)
Method Summary
voidconnect()
voiddisconnect()
Sets the connected field to false and instantiates a new underlying mechanism client object.
InputStreamgetInputStream()
Returns an input stream that reads from this open connection.
OutputStreamgetOutputStream()
Returns an output stream that writes to this connection.
booleanisConnected()
Returns true if the communications link with the end-point has been established; false otherwise.
byte[]receive()
voidreconnect()
voidsend(byte[] message)

Constructor Detail

SaslConnection

public SaslConnection(String m, URL url)

Method Detail

connect

public void connect()

disconnect

public void disconnect()
Sets the connected field to false and instantiates a new underlying mechanism client object.

getInputStream

public InputStream getInputStream()
Returns an input stream that reads from this open connection.

Returns: an input stream that reads from this open connection.

Throws: IOException if an I/O error occurs while creating the input stream. IllegalStateException if this method was invoked before the connection was opened; ie. the authentication phase has not yet occured.

getOutputStream

public OutputStream getOutputStream()
Returns an output stream that writes to this connection.

Returns: an output stream that writes to this connection.

Throws: IOException if an I/O error occurs while creating the output stream. IllegalStateException if this method was invoked before the connection was opened; ie. the authentication phase has not yet occured.

isConnected

public boolean isConnected()
Returns true if the communications link with the end-point has been established; false otherwise.

Returns: true or false depending on wether the communications link with the end-point has been established or not.

receive

public byte[] receive()

reconnect

public void reconnect()

send

public void send(byte[] message)
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.