javax.microedition.io
Interface Connection

All Known Subinterfaces:
ContentConnection, DatabaseConnection, DatagramConnection, HttpConnection, InputConnection, OutputConnection, StorageConnection, StreamConnection, StreamConnectionNotifier

public interface Connection

This is the most basic type of generic connection. Only the open and close methods are defined. The open method is not public because it should only be called via the Connector.open() methods.


Method Summary
 void close()
          Close the connection to the target.
 void open(String name, int mode, boolean timeouts)
          Open a connection to a target.
 void open(String name, String parms, int mode, boolean timeouts)
          Open a connection to a target.
 

Method Detail

open

public void open(String name,
                 int mode,
                 boolean timeouts)
          throws IOException
Open a connection to a target.
Parameters:
name - The target of the connection
mode - A specifier of the access mode
timeouts - A flag to indicate that the called wants timeout exceptions

open

public void open(String name,
                 String parms,
                 int mode,
                 boolean timeouts)
          throws IOException
Open a connection to a target.
Parameters:
name - The target of the connection
parms - Parameters for the target connection
mode - A specifier of the access mode
timeouts - A flag to indicate that the called wants timeout exceptions

close

public void close()
           throws IOException
Close the connection to the target.
Throws:
IOException - If an I/O error occurs