ozone core API

org.ozoneDB.DxLib.net
Class DxClient

java.lang.Object
  extended byorg.ozoneDB.DxLib.DxObject
      extended byorg.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.3 $Date: 2003/03/12 12:30:23 $
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
 
Constructor Summary
DxClient()
           
DxClient(java.net.Socket s)
           
DxClient(java.lang.String host, int port)
           
 
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 org.ozoneDB.DxLib.DxObject
clone, isLess
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ozoneDB.DxLib.DxCompatible
equals
 

Field Detail

buffSize

protected static final int buffSize
The size of the stream buffers. When all data fits into this buffer performance increases. TODO: change this into a configurable setting, so db users can change to their needs.

See Also:
Constant Field Values

sock

protected java.net.Socket sock

in

protected java.io.ObjectInputStream in

out

protected java.io.ObjectOutputStream out
Constructor Detail

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
Method Detail

init

protected void init()
             throws java.io.IOException
Throws:
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.

Throws:
java.io.IOException

onDeconnect

public void onDeconnect()
                 throws java.io.IOException
Diese Methode wird analog zu onConnect() beim schliessen der Verbindung aufgenommen.

Throws:
java.io.IOException

send

public void send(java.lang.Object obj)
          throws java.io.IOException
Throws:
java.io.IOException

receive

public java.lang.Object receive()
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
Throws:
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
Throws:
java.io.IOException

inputStream

public java.io.ObjectInputStream inputStream()

outputStream

public java.io.ObjectOutputStream outputStream()

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.