For the latest news and information visit
The GNU Crypto project

gnu.crypto.tool
Class SaslConnection

java.lang.Object
  extended bygnu.crypto.tool.SaslConnection

public class SaslConnection
extends java.lang.Object

A sample client-side protocol driver.

Version:
$Revision: 1.2 $

Constructor Summary
SaslConnection(java.lang.String m, java.net.URL url)
           
 
Method Summary
 void connect()
           
 void disconnect()
          Sets the connected field to false and instantiates a new underlying mechanism client object.
 java.io.InputStream getInputStream()
          Returns an input stream that reads from this open connection.
 java.io.OutputStream getOutputStream()
          Returns an output stream that writes to this connection.
 boolean isConnected()
          Returns true if the communications link with the end-point has been established; false otherwise.
 byte[] receive()
           
 void reconnect()
           
 void send(byte[] message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaslConnection

public SaslConnection(java.lang.String m,
                      java.net.URL url)
               throws javax.security.sasl.SaslException,
                      java.io.IOException
Method Detail

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.

connect

public void connect()
             throws java.io.IOException
Throws:
java.io.IOException

getInputStream

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

Returns:
an input stream that reads from this open connection.
Throws:
java.io.IOException - if an I/O error occurs while creating the input stream.
java.lang.IllegalStateException - if this method was invoked before the connection was opened; ie. the authentication phase has not yet occured.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an output stream that writes to this connection.

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

send

public void send(byte[] message)
          throws java.io.IOException
Throws:
java.io.IOException

receive

public byte[] receive()
               throws java.io.IOException
Throws:
java.io.IOException

disconnect

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

Throws:
java.io.IOException

reconnect

public void reconnect()
               throws java.io.IOException
Throws:
java.io.IOException

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.