public ServiceDirectoryFuture asyncGetService ( String serviceName , Watcher watcher ) { WatcherRegistration wcb = null ; if ( watcher != null ) { wcb = new WatcherRegistration ( serviceName , watcher ) ; } ProtocolHeader header = new ProtocolHeader ( ) ; header . setType ( ProtocolType . GetService ) ; GetServiceProtocol p = new GetServiceProtocol ( serviceName ) ; p . setWatcher ( false ) ; return connection . submitAsyncRequest ( header , p , wcb ) ; }
Asynchronized get Service .