In netty what progress and total represents in progresive listener -


please explain one, progress , total variables represents in operationprogressed method of channelprogressivefuturelistener iterface, represents total no bytes transfered, following code , output results:

 channelfuture future = channel.writeandflush(bodyrequestencoder, channel.newprogressivepromise());             future.addlistener(new channelprogressivefuturelistener() {                  @override                 public void operationcomplete(channelprogressivefuture future) throws exception {                     // todo auto-generated method stub                  }                  @override                 public void operationprogressed(channelprogressivefuture future, long progress, long total) throws exception {                     system.out.println("progress : " + progress + " of total: " + total);                  }             }); 

and console output:

progress : 1 of total: -1 progress : 2 of total: -1 progress : 3 of total: -1 progress : 4 of total: -1 progress : 5 of total: -1 progress : 6 of total: -1 progress : 7 of total: -1 

the progress progress in per cent , total "the number signifies end of operation when progress reaches @ it. -1 if end of operation unknown".

have @ netty api documentation.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -