ozone core API

org.ozoneDB.core.DbRemote
Class DbLocalClient

java.lang.Object
  extended byorg.ozoneDB.DxLib.DxObject
      extended byorg.ozoneDB.DxLib.net.DxClient
          extended byorg.ozoneDB.core.DbRemote.DbClient
              extended byorg.ozoneDB.core.DbRemote.DbLocalClient
All Implemented Interfaces:
java.lang.Cloneable, DxCompatible, java.io.Serializable

public class DbLocalClient
extends DbClient

Note: the entire connection is synchronized when ExternalDatabase is sending a command through; so synchronization of send/receive is not strictly needed

Version:
$Revision: 1.7 $Date: 2003/03/12 12:30:23 $
Author:
SMB
See Also:
Serialized Form

Field Summary
protected  java.io.ByteArrayOutputStream copyStream
           
protected  DbCommand currentCommand
           
protected  Env env
           
protected  ProxyObjectGate proxyObjectGate
           
protected  User user
           
 
Fields inherited from class org.ozoneDB.core.DbRemote.DbClient
db
 
Fields inherited from class org.ozoneDB.DxLib.net.DxClient
buffSize, in, out, sock
 
Fields inherited from class org.ozoneDB.DxLib.DxObject
 
Constructor Summary
DbLocalClient(org.ozoneDB.ExternalDatabase _db, Env _env, java.lang.String _user)
           
 
Method Summary
 void close()
           
protected  java.lang.Object copyObject(java.lang.Object obj, boolean updateLinks)
          Copy the given object using ByteArrayStreams so all streamable objects (all database objects) can be copied.
 ProxyObjectGate getProxyObjectGate()
          Returns the ProxyObjectGate for this Client.
 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.core.DbRemote.DbClient
user
 
Methods inherited from class org.ozoneDB.DxLib.net.DxClient
init
 
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

env

protected Env env

user

protected User user

currentCommand

protected DbCommand currentCommand

copyStream

protected java.io.ByteArrayOutputStream copyStream

proxyObjectGate

protected ProxyObjectGate proxyObjectGate
Constructor Detail

DbLocalClient

public DbLocalClient(org.ozoneDB.ExternalDatabase _db,
                     Env _env,
                     java.lang.String _user)
              throws UserManagerException,
                     org.ozoneDB.PermissionDeniedException
Method Detail

send

public void send(java.lang.Object obj)
          throws java.io.IOException
Overrides:
send in class DxClient
Throws:
java.io.IOException

receive

public java.lang.Object receive()
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
Overrides:
receive in class DbClient
Throws:
java.io.IOException
java.lang.ClassNotFoundException

copyObject

protected java.lang.Object copyObject(java.lang.Object obj,
                                      boolean updateLinks)
                               throws java.io.IOException
Copy the given object using ByteArrayStreams so all streamable objects (all database objects) can be copied.

Throws:
java.io.IOException

objectAvailable

public boolean objectAvailable()
Description copied from class: DxClient
prueft ob daten im input stream liegen

Overrides:
objectAvailable in class DxClient

close

public void close()
           throws java.io.IOException
Overrides:
close in class DxClient
Throws:
java.io.IOException

onConnect

public void onConnect()
               throws java.io.IOException
Description copied from class: DxClient
Diese Methode wird ausgefuehrt, wenn Verbindung zum Server aufgenommen wird. Sie kann ueberschrieben werden, um ein Verbindungsprotokoll zu implementieren.

Overrides:
onConnect in class DxClient
Throws:
java.io.IOException

onDeconnect

public void onDeconnect()
                 throws java.io.IOException
Description copied from class: DxClient
Diese Methode wird analog zu onConnect() beim schliessen der Verbindung aufgenommen.

Overrides:
onDeconnect in class DxClient
Throws:
java.io.IOException

inputStream

public java.io.ObjectInputStream inputStream()
Overrides:
inputStream in class DxClient

outputStream

public java.io.ObjectOutputStream outputStream()
Overrides:
outputStream in class DxClient

getProxyObjectGate

public ProxyObjectGate getProxyObjectGate()
Returns the ProxyObjectGate for this Client.


ozone core API

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