public void updateServiceInstanceStatus ( String serviceName , String instanceId , OperationalStatus status , final RegistrationCallback cb , Object context ) { ProtocolHeader header = new ProtocolHeader ( ) ; header . setType ( ProtocolType . UpdateServiceInstanceStatus ) ; UpdateServiceInstanceStatusProtocol p = new UpdateServiceInstanceStatusProtocol ( serviceName , instanceId , status ) ; ProtocolCallback pcb = new ProtocolCallback ( ) { @ Override public void call ( boolean result , Response response , ErrorCode error , Object ctx ) { cb . call ( result , error , ctx ) ; } } ; connection . submitCallbackRequest ( header , p , pcb , context ) ; }
Update ServiceInstance status with Callback .