Package org.jdesktop.wonderland.common.messages

Examples of org.jdesktop.wonderland.common.messages.ErrorMessage


            logger.log(Level.WARNING, "Error extracting message from server",
                       eme);

            // if possible, send an error reply to the client
            if (eme.getMessageID() != null) {
                message = new ErrorMessage(eme.getMessageID(),
                                           eme.getMessage(),
                                           eme.getCause());
                clientID = eme.getClientID();
            } else {
                return;
View Full Code Here


                rm = sendAndWait(new ClientConnectMessage(cellID));
               
                if (rm instanceof ClientConnectResponseMessage) {
                    handleMessage(rm);
                } else if (rm instanceof ErrorMessage) {
                    ErrorMessage em = (ErrorMessage) rm;
                    logger.log(Level.WARNING, "Error getting presence info " +
                               em.getErrorMessage(), em.getErrorCause());
                }
            } catch (InterruptedException ie) {
                logger.log(Level.WARNING, "Error reading presence info", ie);
            }
View Full Code Here

      WonderlandClientID clientID, CellTransformRequestMessage message)
    {
        CellID cellID = ((CellTransformRequestMessage) message).getRequestCellID();
        CellMO cell = CellManagerMO.getCell(cellID);
        if (cell == null || !cell.isLive()) {
            sender.send(clientID, new ErrorMessage(message.getMessageID(),
                        "Cell " + cellID + " not found"));
        } else {
            sender.send(clientID,
                    new CellTransformResponseMessage(
                        message.getMessageID(), cell.getWorldTransform(null)));
View Full Code Here

                response = handleRemoveRequest(clientID, (RemoveRequestMessage) message);
            } else {
                String error = "[SharedStateComponentMO]: Unknown message " +
                               "type: " + message.getClass() + " " + message;
                logger.warning(error);
                response = new ErrorMessage(message.getMessageID(), error);
            }

            // send the response to the caller
            sender.send(clientID, response);
        }
View Full Code Here

            if (map.put(clientID, message))
            {
                return new OKMessage(message.getMessageID());
            }

            return new ErrorMessage(message.getMessageID(), "Request vetoed");
        }
View Full Code Here

            // remove the key from the map if the map exists
            if (map == null || map.remove(clientID, message)) {
                return new OKMessage(message.getMessageID());
            }

            return new ErrorMessage(message.getMessageID(), "Request vetied");
        }
View Full Code Here

     * @param cause the underlying exception
     */
    protected void sendError(MessageID messageID, short clientID,
                             String error, Throwable cause)
    {
        ErrorMessage msg = new ErrorMessage(messageID, error, cause);
        sendToSession(clientID, msg);
    }
View Full Code Here

     * @param cause the underlying exception
     */
    protected void sendError(MessageID messageID, String error,
                             Throwable cause)
    {
        sendToSession(new ErrorMessage(messageID, error, cause));
    }
View Full Code Here

               
                // success
                setSuccess(true);
            } else if (response instanceof ErrorMessage) {
                // error -- throw an exception
                ErrorMessage e = (ErrorMessage) response;
                setException(new ConnectionFailureException(e.getErrorMessage(),
                                                        e.getErrorCause()));
            } else {
                // bad situation
                setException(new ConnectionFailureException("Unexpected response " +
                                                        "type: " + response));
            }
View Full Code Here

    protected ResponseListener createMoveResponseListener(final CellMoveModifiedListener listener) {
        if (listener == null) {
            return new ResponseListener() {
                public void responseReceived(ResponseMessage response) {
                    if (response instanceof ErrorMessage) {
                        ErrorMessage error = (ErrorMessage) response;
                        logger.log(Level.WARNING, "Error sending move: " +
                                   error.getErrorMessage(),
                                   error.getErrorCause());
                    }
                }
            };
        }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.messages.ErrorMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.