public void Service(MqS ctx) throws MqSException { try { FH.write(ctx.ReadC() + "\n"); FH.flush(); } catch (Throwable ex) { ErrorPrint(ex); } ctx.SendRETURN(); }
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"); }
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(); } }
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); } }