public static ServiceActor RunTCP ( String args [ ] , Class < ? extends ServiceActor > serviceClazz , Class < ? extends ServiceArgs > argsClazz ) { ServiceActor myService = AsActor ( serviceClazz ) ; ServiceArgs options = null ; try { options = ServiceRegistry . parseCommandLine ( args , null , argsClazz . newInstance ( ) ) ; } catch ( Exception e ) { FSTUtil . rethrow ( e ) ; } TCPConnectable connectable = new TCPConnectable ( ServiceRegistry . class , options . getRegistryHost ( ) , options . getRegistryPort ( ) ) ; myService . init ( connectable , options , true ) . await ( 30_000 ) ; Log . Info ( myService . getClass ( ) , "Init finished" ) ; return myService ; }
run & connect a service with given cmdline args and classes