Author: adietish
Date: 2011-09-15 13:14:07 -0400 (Thu, 15 Sep 2011)
New Revision: 34774
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java
Log:
[JBIDE-9510] implementing IOpenshiftService#getApplicationStatus and
ApplicationStatusReader
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java 2011-09-15
17:08:51 UTC (rev 34773)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java 2011-09-15
17:14:07 UTC (rev 34774)
@@ -17,6 +17,11 @@
import java.util.regex.Pattern;
/**
+ * TODO: make sure it behaves correctly on subsequent requests that get app
+ * status on the server: The server would either repeat the whole log or just
+ * respond with the diff.
+ *
+ *
* @author André Dietisheim
*/
public class ApplicationLogReader extends Reader {
@@ -61,13 +66,6 @@
return status.substring(logIndex);
}
- @Override
- public void close() throws IOException {
- if (logReader != null) {
- logReader.close();
- }
- }
-
protected String requestStatus() throws IOException {
try {
return service.getStatus(application.getName(), application.getCartridge());
@@ -75,4 +73,11 @@
throw new IOException(e);
}
}
+
+ @Override
+ public void close() throws IOException {
+ if (logReader != null) {
+ logReader.close();
+ }
+ }
}