Пример #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();
 }