1 9 package org.ozoneDB.core.DbRemote; 10 11 import org.ozoneDB.DxLib.net.DxClient; 12 import org.ozoneDB.ExternalDatabase; 13 import org.ozoneDB.core.Env; 14 15 import java.io.IOException ; 16 17 18 22 public abstract class DbClient extends DxClient { 23 24 protected ExternalDatabase db; 25 26 protected String user = ""; 27 28 29 public DbClient(ExternalDatabase _db,String _user) { 30 db = _db; 31 user = _user; 32 } 33 34 35 public DbClient( ExternalDatabase _db, String _host, int _port, String _user ) throws IOException { 36 super( _host, _port ); 37 db = _db; 38 user = _user; 39 } 40 41 42 public String user() { 43 return user; 44 } 45 46 public Object receive() throws IOException , ClassNotFoundException { 47 Object result = super.receive(); 48 49 if (Env.selfCheck) { 50 if (result==null) { 51 55 } 56 } 57 58 return result; 59 } 60 } 61 | Popular Tags |