org.ozoneDB.DxLib.net
Class DxClient
java.lang.Object
|
+--org.ozoneDB.DxLib.DxObject
|
+--org.ozoneDB.DxLib.net.DxClient
- All Implemented Interfaces:
- java.lang.Cloneable, DxCompatible, java.io.Serializable
- Direct Known Subclasses:
- DbClient, DxAsyncClient, DxMultiServerClient, DxServer
- public class DxClient
- extends DxObject
DxClient stellt ein Ende einer Socketverbindung dar, an die DxCompatibles
gesendet oder empfangen werden koennen. am anderen Ende der Verbindung
sollte entweder ein DxServer oder DxMultiServer sein.
- Version:
- $Revision: 1.1 $Date: 2001/12/18 10:31:30 $
- Author:
- SMB
- See Also:
- Serialized Form
Field Summary |
protected static int |
buffSize
The size of the stream buffers. |
protected java.io.ObjectInputStream |
in
|
protected java.io.ObjectOutputStream |
out
|
protected java.net.Socket |
sock
|
Fields inherited from class org.ozoneDB.DxLib.DxObject |
|
Method Summary |
void |
close()
|
protected void |
init()
|
java.io.ObjectInputStream |
inputStream()
|
boolean |
objectAvailable()
prueft ob daten im input stream liegen |
void |
onConnect()
Diese Methode wird ausgefuehrt, wenn Verbindung zum Server aufgenommen
wird. |
void |
onDeconnect()
Diese Methode wird analog zu onConnect() beim schliessen der Verbindung
aufgenommen. |
java.io.ObjectOutputStream |
outputStream()
|
java.lang.Object |
receive()
|
void |
send(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffSize
protected static final int buffSize
- The size of the stream buffers. This should be smaller than the MTU of
the connections, which for Ethernet is 1500. (is this right?)
- See Also:
- Constant Field Values
sock
protected java.net.Socket sock
in
protected java.io.ObjectInputStream in
out
protected java.io.ObjectOutputStream out
DxClient
public DxClient()
DxClient
public DxClient(java.lang.String host,
int port)
throws java.io.IOException
DxClient
public DxClient(java.net.Socket s)
throws java.io.IOException
init
protected void init()
throws java.io.IOException
java.io.IOException
onConnect
public void onConnect()
throws java.io.IOException
- Diese Methode wird ausgefuehrt, wenn Verbindung zum Server aufgenommen
wird. Sie kann ueberschrieben werden, um ein Verbindungsprotokoll zu
implementieren.
java.io.IOException
onDeconnect
public void onDeconnect()
throws java.io.IOException
- Diese Methode wird analog zu onConnect() beim schliessen der Verbindung
aufgenommen.
java.io.IOException
send
public void send(java.lang.Object obj)
throws java.io.IOException
java.io.IOException
receive
public java.lang.Object receive()
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
objectAvailable
public boolean objectAvailable()
- prueft ob daten im input stream liegen
close
public void close()
throws java.io.IOException
java.io.IOException
inputStream
public java.io.ObjectInputStream inputStream()
outputStream
public java.io.ObjectOutputStream outputStream()
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.