?? terminalinfoinvokerimpl.java
字號(hào):
package jp.co.ntl.swing.ext.terminal;
import java.util.Vector;
import jp.co.ntl.Net;
import jp.co.ntl.NetworkException;
import jp.co.ntl.ServerException;
import jp.co.ntl.TimeOutException;
import jp.co.ntl.terminal.TerminalInfo;
import jp.co.ntl.swing.ext.InvokerUtil;
public class TerminalInfoInvokerImpl extends TerminalInfoInvoker {
InvokerUtil iu;
TerminalInfoInvokerImpl(Net net) {
this.iu = new InvokerUtil(net);
}
public int addTerminal(TerminalInfo terminalInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetInt(Net.terminalServletName, Net.CMD_AddTerminal, terminalInfo);
}
public void delTerminal(Vector vcTerminalInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.terminalServletName, Net.CMD_DeleteTerminal, vcTerminalInfo);
}
public Vector getTerminalInfo() throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.terminalServletName, Net.CMD_GetTerminalInfo);
}
// 2007.10.22 lium 暋悢僾儕儞僞懳墳 add start
public Vector getLocalTerminalInfo() throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.terminalServletName, Net.CMD_GetLocalTerminalInfo);
}
// 2007.10.22 lium 暋悢僾儕儞僞懳墳 add end
public void setTerminalInfo(TerminalInfo terminalInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.terminalServletName, Net.CMD_SetTerminalInfo, terminalInfo);
}
// 2007.10.26 KAlive add start
public void setTerminalStatus(TerminalInfo terminalInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.terminalServletName, Net.CMD_SetTerminalStatus, terminalInfo);
}
// 2007.10.26 KAlive add end
public Vector getRelatedPrinterList(TerminalInfo terminalInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.terminalServletName, Net.CMD_GetRelatedPrinterList, terminalInfo);
}
/*
public void addRelatedPrinter(TerminalInfo terminalInfo, Vector vcPrinterInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
Hashtable h = new Hashtable();
h.put("TerminalInfo", terminalInfo);
h.put("PrinterList", vcPrinterInfo);
is = new ObjectInputStream(net.sendCommand(Net.terminalServletName, "AddRelatedPrinter", h));
} catch (IOException e) {
throw new NetworkException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
throw new NetworkException(e.getMessage());
} catch (KeyManagementException e) {
throw new NetworkException(e.getMessage());
} finally {
gc.releaseConnection();
}
try {
gc.enterConnection();
boolean b;
try {
b = is.readBoolean();
} catch (IOException e) {
throw new ServerException(e.getMessage());
}
if (b) {
;
} else {
try {
String message = is.readUTF();
if (message.equals(Net.resultServerError)) {
throw new ServerException("error");
} else if (message.equals(Net.resultTimeOut)) {
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}
public void releaseRelatedPrinter(TerminalInfo terminalInfo, Vector vcPrinterInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
Hashtable h = new Hashtable();
h.put("TerminalInfo", terminalInfo);
h.put("PrinterList", vcPrinterInfo);
is = new ObjectInputStream(net.sendCommand(Net.terminalServletName, "ReleaseRelatedPrinter", h));
} catch (IOException e) {
throw new NetworkException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
throw new NetworkException(e.getMessage());
} catch (KeyManagementException e) {
throw new NetworkException(e.getMessage());
} finally {
gc.releaseConnection();
}
try {
gc.enterConnection();
boolean b;
try {
b = is.readBoolean();
} catch (IOException e) {
throw new ServerException(e.getMessage());
}
if (b) {
;
} else {
try {
String message = is.readUTF();
if (message.equals(Net.resultServerError)) {
throw new ServerException("error");
} else if (message.equals(Net.resultTimeOut)) {
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}*/
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -