|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfr.ove.utils.Connection
A connection object. Opens a socket to the specified host on the specified port number.
| Constructor Summary | |
Connection()
The default constructor. |
|
Connection(java.lang.String hostName,
int portNumber)
The Constructor. |
|
| Method Summary | |
void |
close()
Closes the connection. |
java.lang.String |
getHostName()
Returns the host name for the connection to create. |
java.io.InputStream |
getInputStream()
Gets the input stream to read from the socket. |
java.io.OutputStream |
getOutputStream()
Gets the output stream to write into the socket. |
int |
getPortNumber()
Returns the port number for the connexion to create. |
boolean |
isOpened()
Checks wether the connection is opened. |
void |
open()
Opens the connection. |
void |
open(java.net.Socket socket)
Opens the connection through the specified socket. |
void |
setHostName(java.lang.String name)
Sets the host name for the connection to create. |
void |
setPortNumber(int number)
Sets the port number for the connexion to create. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Connection()
public Connection(java.lang.String hostName,
int portNumber)
hostName - the host name.portNumber - the port number.| Method Detail |
public void setHostName(java.lang.String name)
setHostName in interface ConnectionConfigurablename - the host name.public java.lang.String getHostName()
getHostName in interface ConnectionConfigurablepublic void setPortNumber(int number)
setPortNumber in interface ConnectionConfigurablenumber - the port number.public int getPortNumber()
getPortNumber in interface ConnectionConfigurable
public void open()
throws java.io.IOException
java.io.IOException
public void open(java.net.Socket socket)
throws java.io.IOException
socket - the specified socket.
java.io.IOExceptionpublic boolean isOpened()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||