示例#1
0
 public void Service(MqS ctx) throws MqSException {
   try {
     FH.write(ctx.ReadC() + "\n");
     FH.flush();
   } catch (Throwable ex) {
     ErrorPrint(ex);
   }
   ctx.SendRETURN();
 }
示例#2
0
 public void ServerSetup() throws MqSException {
   MqS ftr = ServiceGetFilter();
   ServiceCreate("LOGF", new LOGF());
   ServiceCreate("EXIT", new EXIT());
   ServiceCreate("+ALL", this);
   ServiceStorage("PRNT");
   ftr.ServiceCreate("WRIT", new WRIT());
   ftr.ServiceProxy("+TRT");
 }
示例#3
0
 public static void main(String[] argv) {
   MqS.Init("java", "example.Filter6");
   Filter6 srv = MqFactoryS.Add("transFilter", Filter6.class).New();
   try {
     srv.ConfigSetIgnoreExit(true);
     srv.LinkCreate(argv);
     srv.ProcessEvent(MqS.WAIT.FOREVER);
   } catch (Throwable e) {
     srv.ErrorSet(e);
   } finally {
     srv.Exit();
   }
 }
示例#4
0
 public void Event() throws MqSException {
   MqS ftr = ServiceGetFilter();
   if (StorageCount() == 0L) {
     ErrorSetCONTINUE();
   } else {
     long Id = 0L;
     try {
       ftr.LinkConnect();
       Id = StorageSelect();
       ReadForward(ftr);
     } catch (Throwable ex) {
       ErrorSet(ex);
       if (ErrorIsEXIT()) {
         ftr.LinkConnect();
         ErrorReset();
         return;
       } else {
         ErrorWrite();
       }
     }
     StorageDelete(Id);
   }
 }