Package com.opengamma.livedata.cogda.msg

Examples of com.opengamma.livedata.cogda.msg.ConnectionResponseMessage


        _user = getServer().getOGUser(request.getUserName());
      }
    }
   
    if (getUserPrincipal() == null) {
      ConnectionResponseMessage response = new ConnectionResponseMessage();
      response.setResult(ConnectionResult.NOT_AUTHORIZED);
      sendMessage(ConnectionResponseBuilder.buildMessageStatic(new FudgeSerializer(fudgeContext), response));
      // On failure tear down the connection when http://jira.opengamma.com/browse/PLAT-2458 is done.
      getServer().removeClient(this);
    } else {
      ConnectionResponseMessage response = new ConnectionResponseMessage();
      response.setResult(ConnectionResult.NEW_CONNECTION_SUCCESS);
      response.setAvailableServers(getServer().getAvailableServers());
      response.applyCapabilities(getServer().getCapabilities());
      sendMessage(ConnectionResponseBuilder.buildMessageStatic(new FudgeSerializer(fudgeContext), response));
    }
  }
View Full Code Here


    requestMessage.setUserName(_user.getUserName());
    _messageSender.send(ConnectionRequestBuilder.buildMessageStatic(new FudgeSerializer(getFudgeContext()), requestMessage));
    // TODO kirk 2012-08-22 -- This needs a timeout.
    FudgeMsgReader reader = getFudgeContext().createMessageReader(is);
    FudgeMsg msg = reader.nextMessage();
    ConnectionResponseMessage response = ConnectionResponseBuilder.buildObjectStatic(new FudgeDeserializer(getFudgeContext()), msg);
    switch(response.getResult()) {
      case NEW_CONNECTION_SUCCESS:
      case EXISTING_CONNECTION_RESTART:
        // We're good to go!
        // TODO kirk 2012-08-15 -- Add logic eventually for connection restart semantics.
        s_logger.warn("Successfully logged into server.");
View Full Code Here

TOP

Related Classes of com.opengamma.livedata.cogda.msg.ConnectionResponseMessage

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.