1 21 22 package org.apache.derby.client.am; 23 24 import org.apache.derby.shared.common.reference.SQLState; 25 26 public class DisconnectException extends SqlException { 27 public DisconnectException(Agent agent, ClientMessageId msgid, 28 Object [] args, SqlCode sqlcode, Throwable t) { 29 super(agent != null ? agent.logWriter_ : null, msgid, 30 args, sqlcode, t); 31 32 if (agent != null) { 34 agent.disconnectEvent(); 35 } 36 } 37 38 public DisconnectException(Agent agent, ClientMessageId msgid, 39 Object [] args, SqlCode sqlcode) { 40 this(agent, msgid, args, sqlcode, (Throwable )null); 41 } 42 43 public DisconnectException(Agent agent, ClientMessageId msgid, SqlCode sqlcode) { 44 this(agent, msgid, (Object []) null, sqlcode); 45 } 46 47 48 public DisconnectException(Agent agent, ClientMessageId msgid, 49 Object [] args) { 50 this(agent, msgid, args, SqlCode.disconnectError); 51 } 52 53 public DisconnectException(Agent agent, ClientMessageId msgid, 54 Object [] args, Throwable t) { 55 this(agent, msgid, args, SqlCode.disconnectError, (Throwable )t); 56 } 57 58 public DisconnectException(Agent agent, ClientMessageId msgid, 59 Object arg1, Throwable t) { 60 this(agent, msgid, new Object [] { arg1 }, t); 61 } 62 63 public DisconnectException(Agent agent, ClientMessageId msgid) { 64 this(agent, msgid, (Object [])null); 65 } 66 67 public DisconnectException(Agent agent, ClientMessageId msgid, Object arg1) { 68 this(agent, msgid, new Object [] { arg1 }); 69 } 70 71 public DisconnectException(Agent agent, ClientMessageId msgid, Object arg1, 72 Object arg2) { 73 this(agent, msgid, new Object [] { arg1, arg2 }); 74 } 75 76 public DisconnectException(Agent agent, SqlException e) { 77 super(agent.logWriter_, 78 new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED), 79 e.getMessage(), e); 80 } 81 } 82 | Popular Tags |