jetbrains.buildServer.serverSide.agent
Class DefaultCallback

java.lang.Object
  extended by jetbrains.buildServer.serverSide.agent.DefaultCallback
All Implemented Interfaces:
SAgentFileManager.Callback

public class DefaultCallback
extends java.lang.Object
implements SAgentFileManager.Callback

Example usage:

   final DefaultCallback callback = new DefaultCallback();
   myAgentFileManager.requestForFile(agentName, fileName, useCache, callback);

   new WaitFor() {
     @Override
     protected boolean condition() {
       return callback.isComplete();
     }
   };
 

Since:
6.0
Author:
Maxim Podkolzine (maxim.podkolzine@jetbrains.com)

Constructor Summary
DefaultCallback()
           
 
Method Summary
 void error(java.lang.String reason)
          Is called in case of error.
 java.lang.String getError()
           
 java.io.File getFile()
           
 boolean isComplete()
           
 void success(java.io.File file)
          Is called in case of success.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCallback

public DefaultCallback()
Method Detail

error

public void error(@NotNull
                  java.lang.String reason)
Description copied from interface: SAgentFileManager.Callback
Is called in case of error.

Specified by:
error in interface SAgentFileManager.Callback
Parameters:
reason - error reason

success

public void success(@NotNull
                    java.io.File file)
Description copied from interface: SAgentFileManager.Callback
Is called in case of success.

Specified by:
success in interface SAgentFileManager.Callback
Parameters:
file - local file (or directory) requested

isComplete

public boolean isComplete()

getError

public java.lang.String getError()

getFile

public java.io.File getFile()