"
|
Field Summary |
protected int |
handle
This is the handle we use - it can be accessed by the stream classes |
|
Constructor Summary |
Connection()
The default constructor - this is required to set the handle |
Connection(int handle)
Create a new connection with the handle already there - used by the server socket
accept and open method |
handle
protected int handle
- This is the handle we use - it can be accessed by the stream classes
Connection
public Connection()
- The default constructor - this is required to set the handle
Connection
public Connection(int handle)
- Create a new connection with the handle already there - used by the server socket
accept and open method
- Parameters:
handle - The handle to use
setParameters
public void setParameters(java.lang.String url,
int mode,
boolean timeouts)
throws IOException
- Set the URL, mode and timeouts
- Specified by:
setParameters in class BaseConnection
- Parameters:
url - The URL passed to connector.openmode - The mode passed to connector.open or DEFAULTtimeouts - true if timeout exceptions should occur
- Throws:
IOException - if there is a problem
openConnection
protected void openConnection()
throws IOException
- Open the connection using the values in address, port and parameters
- Throws:
IOException - if there is an error
close
public void close()
throws IOException
- Close the underlying socket. This should only be closed when the open count goes
down to zero.
- Specified by:
close in interface Connection
- Throws:
IOException - if there is an error
closeInputStream
public void closeInputStream()
throws IOException
- Close method called by an input stream
- Throws:
IOException - if the socket is not alive
closeOutputStream
public void closeOutputStream()
throws IOException
- Close method called by an output stream
- Throws:
IOException - if the socket is not alive
openInputStream
public InputStream openInputStream()
throws IOException
- Open an input stream
- Specified by:
openInputStream in interface InputConnection
- Returns:
- the input stream
- Throws:
IOException - if there is an error
openDataInputStream
public java.io.DataInputStream openDataInputStream()
throws IOException
- Open a data input stream
- Specified by:
openDataInputStream in interface InputConnection
- Returns:
- the data input stream
- Throws:
IOException - if there is an error
openOutputStream
public OutputStream openOutputStream()
throws IOException
- Open an output stream
- Specified by:
openOutputStream in interface OutputConnection
- Returns:
- the output stream
- Throws:
IOException - if there is an error
openDataOutputStream
public java.io.DataOutputStream openDataOutputStream()
throws IOException
- Open a data output stream
- Specified by:
openDataOutputStream in interface OutputConnection
- Returns:
- the data output stream
- Throws:
IOException - if there is an error
DCT Lightfoot v3 API specification