コード例 #1
0
 public SMGPSMProxy(Args args) {
   conn = new SMGPConnection(args);
   conn.addEventListener(new SMGPEventAdapter(this));
   conn.waitAvailable();
   if (!conn.available()) throw new IllegalStateException(conn.getError());
   else return;
 }
コード例 #2
0
 public SMGPMessage send(SMGPMessage message) throws IOException {
   if (message == null) return null;
   SMGPTransaction t = (SMGPTransaction) conn.createChild();
   try {
     t.send(message);
     t.waitResponse();
     SMGPMessage rsp = t.getResponse();
     SMGPMessage smgpmessage = rsp;
     return smgpmessage;
   } finally {
     t.close();
   }
 }
コード例 #3
0
 public String getConnState() {
   return conn.getError();
 }
コード例 #4
0
 public void close() {
   conn.close();
 }