📄 printerinfoinvokerimpl.java
字号:
package jp.co.ntl.swing.ext.printer.printer;
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.printer.PrinterInfo2;
import jp.co.ntl.swing.ext.InvokerUtil;
class PrinterInfoInvokerImpl extends PrinterInfoInvoker {
InvokerUtil iu;
public PrinterInfoInvokerImpl(Net net) {
iu = new InvokerUtil(net);
}
public Vector getPrinterInfo() throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.printerServletName, Net.CMD_GetPrinterInfo);
}
public void setPrinterInfo(PrinterInfo2 printerInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.printerServletName, Net.CMD_SetPrinterInfo, printerInfo);
}
public int addPrinter(PrinterInfo2 printerInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetInt(Net.printerServletName, Net.CMD_AddPrinter, printerInfo);
}
public void delPrinter(Vector vcPrinterInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.printerServletName, Net.CMD_DelPrinter, vcPrinterInfo);
}
public boolean isRelatedPrinter(Vector vcPrinterInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetBoolean(Net.printerServletName, Net.CMD_IsRelatedPrinter, vcPrinterInfo, InvokerUtil.RET_RELATED);
}
public Vector getPrinterList() throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.printerServletName, Net.CMD_GetPrinterList);
}
public Vector getRelatedPrinterGroup(PrinterInfo2 printerInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.printerServletName, Net.CMD_GetRelatedPrinterGroupList, printerInfo);
}
public Vector getRelatedGroup(PrinterInfo2 printerInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.printerServletName, Net.CMD_GetRelatedGroupList, printerInfo);
}
public boolean isRelatedPrinterOnAccount(Vector vcPrinterInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetBoolean(Net.printerServletName, Net.CMD_IsRelatedPrinterOnAccount, vcPrinterInfo, InvokerUtil.RET_RELATED);
}
/*
public void addRelatedPrinterGroup(PrinterRelationInfo prInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
is = new ObjectInputStream(net.sendCommand(Net.printerServletName, "AddRelatedPrinterGroup", prInfo));
} 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)) {
/// net.showLoginPage();
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}
public void releaseRelatedPrinterGroup(PrinterRelationInfo prInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
is = new ObjectInputStream(net.sendCommand(Net.printerServletName, "ReleaseRelatedPrinterGroup", prInfo));
} 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)) {
/// net.showLoginPage();
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}*/
/*
public void addRelatedGroup(GroupRelationInfo grInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
is = new ObjectInputStream(net.sendCommand(Net.printerServletName, "AddRelatedGroup", grInfo));
} 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)) {
/// net.showLoginPage();
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}
public void releaseRelatedGroup(GroupRelationInfo grInfo) throws NetworkException, ServerException, TimeOutException {
ObjectInputStream is;
try {
gc.enterConnection();
is = new ObjectInputStream(net.sendCommand(Net.printerServletName, "ReleaseRelatedGroup", grInfo));
} 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)) {
/// net.showLoginPage();
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -