import com.vaadin.server.RpcManager.RpcInvocationException;
import com.vaadin.server.StreamVariable.StreamingEndEvent;
import com.vaadin.server.StreamVariable.StreamingErrorEvent;
-import com.vaadin.server.Terminal.ErrorEvent;
-import com.vaadin.server.Terminal.ErrorListener;
import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.Connector;
import com.vaadin.shared.JavaScriptConnectorState;
import java.util.logging.Level;
import java.util.logging.Logger;
-import com.vaadin.server.Terminal.ErrorEvent;
import com.vaadin.ui.AbstractComponent;
-public class DefaultErrorListener implements Terminal.ErrorListener {
+public class DefaultErrorListener implements ErrorListener {
@Override
public void terminalError(ErrorEvent event) {
doDefault(event);
--- /dev/null
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.server;
+
+import java.io.Serializable;
+
+/**
+ * An error event implementation for Terminal.
+ */
+public interface ErrorEvent extends Serializable {
+
+ /**
+ * Gets the contained throwable, the cause of the error.
+ */
+ public Throwable getThrowable();
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.server;
+
+import java.io.Serializable;
+
+/**
+ * Interface for listening to Terminal errors.
+ */
+public interface ErrorListener extends Serializable {
+
+ /**
+ * Invoked when a terminal error occurs.
+ *
+ * @param event
+ * the fired event.
+ */
+ public void terminalError(ErrorEvent event);
+}
\ No newline at end of file
import java.io.FileInputStream;
import java.io.FileNotFoundException;
-import com.vaadin.server.Terminal.ErrorEvent;
import com.vaadin.util.FileTypeResolver;
/**
import java.util.Map;
import java.util.Map.Entry;
-import com.vaadin.server.Terminal.ErrorEvent;
-import com.vaadin.server.Terminal.ErrorListener;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.UI;
+++ /dev/null
-/*
- * Copyright 2011 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.vaadin.server;
-
-import java.io.Serializable;
-
-/**
- * An interface that provides information about the user's terminal.
- * Implementors typically provide additional information using methods not in
- * this interface. </p>
- *
- * @author Vaadin Ltd.
- * @since 3.0
- * @deprecated Currently only a container for ErrorEvent and ErrorListener
- */
-@Deprecated
-public interface Terminal extends Serializable {
-
- /**
- * An error event implementation for Terminal.
- */
- public interface ErrorEvent extends Serializable {
-
- /**
- * Gets the contained throwable, the cause of the error.
- */
- public Throwable getThrowable();
-
- }
-
- /**
- * Interface for listening to Terminal errors.
- */
- public interface ErrorListener extends Serializable {
-
- /**
- * Invoked when a terminal error occurs.
- *
- * @param event
- * the fired event.
- */
- public void terminalError(Terminal.ErrorEvent event);
- }
-}
}
@SuppressWarnings("serial")
- public class RequestError implements Terminal.ErrorEvent, Serializable {
+ public class RequestError implements ErrorEvent, Serializable {
private final Throwable throwable;
return u;
}
- public class RequestError implements Terminal.ErrorEvent, Serializable {
+ public class RequestError implements ErrorEvent, Serializable {
private final Throwable throwable;
* Session wide error handler which is used by default if an error is left
* unhandled.
*/
- private Terminal.ErrorListener errorHandler = new DefaultErrorListener();
+ private ErrorListener errorHandler = new DefaultErrorListener();
/**
* The converter factory that is used to provide default converters for the
*
* @return the current error handler
*/
- public Terminal.ErrorListener getErrorHandler() {
+ public ErrorListener getErrorHandler() {
return errorHandler;
}
*
* @param errorHandler
*/
- public void setErrorHandler(Terminal.ErrorListener errorHandler) {
+ public void setErrorHandler(ErrorListener errorHandler) {
this.errorHandler = errorHandler;
}
* should be used. This indicates that the problem is caused by the
* application - not by the user.
*/
- public class ApplicationError implements Terminal.ErrorEvent {
+ public class ApplicationError implements ErrorEvent {
private final Throwable throwable;
public ApplicationError(Throwable throwable) {
/**
* VariableOwner error event.
*/
- public interface ErrorEvent extends Terminal.ErrorEvent {
+ public interface ErrorEvent extends com.vaadin.server.ErrorEvent {
/**
* Gets the source VariableOwner.
import com.vaadin.server.ComponentSizeValidator;
import com.vaadin.server.ErrorMessage;
import com.vaadin.server.Resource;
-import com.vaadin.server.Terminal;
import com.vaadin.server.VaadinSession;
import com.vaadin.shared.ComponentConstants;
import com.vaadin.shared.AbstractComponentState;
}
}
- public interface ComponentErrorEvent extends Terminal.ErrorEvent {
+ public interface ComponentErrorEvent extends com.vaadin.server.ErrorEvent {
}
public interface ComponentErrorHandler extends Serializable {
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.server.ClassResource;
import com.vaadin.server.DownloadStream;
+import com.vaadin.server.ErrorEvent;
import com.vaadin.server.LegacyApplication;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
}
@Override
- public void terminalError(com.vaadin.server.Terminal.ErrorEvent event) {
+ public void terminalError(com.vaadin.server.ErrorEvent event) {
Throwable t = event.getThrowable();
// Was this caused by a GAE timeout?
while (t != null) {
*/
package com.vaadin.tests.application;
+import com.vaadin.server.ErrorEvent;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
}
@Override
- public void terminalError(com.vaadin.server.Terminal.ErrorEvent event) {
+ public void terminalError(com.vaadin.server.ErrorEvent event) {
event.getThrowable().printStackTrace();
UI mainWindow = getMainWindow();
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.event.FieldEvents.FocusNotifier;
+import com.vaadin.server.ErrorEvent;
import com.vaadin.server.Resource;
import com.vaadin.server.ThemeResource;
import com.vaadin.tests.util.Log;
}
@Override
- public void terminalError(com.vaadin.server.Terminal.ErrorEvent event) {
+ public void terminalError(com.vaadin.server.ErrorEvent event) {
String logMsg = "Exception occured, "
+ event.getThrowable().getClass().getName();
import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.event.ShortcutAction.ModifierKey;
+import com.vaadin.server.ErrorEvent;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
}
@Override
- public void terminalError(com.vaadin.server.Terminal.ErrorEvent event) {
+ public void terminalError(com.vaadin.server.ErrorEvent event) {
super.terminalError(event);
getMainWindow().showNotification("Failed!",
Notification.TYPE_ERROR_MESSAGE);