1. #1
    Sencha User
    Join Date
    Feb 2013
    Location
    Russian federation, Smolensk
    Posts
    38
    Answers
    5
    Vote Rating
    0
    Mike_javaJunior is on a distinguished road

      0  

    Default Answered: AsyncCallback

    Answered: AsyncCallback


    Hi everyone!
    Using rpc I call the method which must return Long type.
    Code:
        private final ServerManagementAsync serverManagementSvc = GWT.create(ServerManagement.class);
    
       public ContentPanel createChart(final String customerId){
    
    
           final Long queueSize;
           AsyncCallback<Long> ac = new AsyncCallback<Long>() {
               @Override
               public void onFailure(Throwable throwable) {
                   //To change body of implemented methods use File | Settings | File Templates.
               }
    
    
               @Override
               public void onSuccess(Long aLong) {
                   //To change body of implemented methods use File | Settings | File Templates.
               }
           };
           
           //here I need to add this value to queueSize
           serverManagementSvc.getMessageQueueSize(customerId, ac);
    but is sais that this method returns the void type
    here is the method itself

    Code:
    public Long getMessageQueueSize(final String customerId) throws Exception{        RuntimeStats rs = mi.getStats(customerId);
            return rs.getQueueSize();
        }
    here is it is in interface
    Code:
    Long getMessageQueueSize(String customerId) throws Exception;

  2. Oh, the solution differs from what I thought. But I've found it

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    Russian federation, Smolensk
    Posts
    38
    Answers
    5
    Vote Rating
    0
    Mike_javaJunior is on a distinguished road

      0  

    Default


    Oh, the solution differs from what I thought. But I've found it