Package com.opengamma.livedata.cogda.msg

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


    FudgeMsg msg = msgEnvelope.getMessage();
    if (CogdaMessageType.getFromMessage(msg) != CogdaMessageType.CONNECTION_REQUEST) {
      // On failure tear down the connection when http://jira.opengamma.com/browse/PLAT-2458 is done.
      throw new OpenGammaRuntimeException("Cannot handle any other message than connection request as first message in COGDA protocol.");
    }
    ConnectionRequestMessage request = ConnectionRequestBuilder.buildObjectStatic(new FudgeDeserializer(fudgeContext), msg);
   
    // Wrap this in synchronized to force the cache flush.
    synchronized (this) {
      _userPrincipal = getServer().authenticate(request.getUserName(), request.getPassword());
      if (_userPrincipal != null) {
        _user = getServer().getOGUser(request.getUserName());
      }
    }
   
    if (getUserPrincipal() == null) {
      ConnectionResponseMessage response = new ConnectionResponseMessage();
View Full Code Here


    }
   
  }

  protected void login(InputStream is) throws IOException {
    ConnectionRequestMessage requestMessage = new ConnectionRequestMessage();
    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);
View Full Code Here

TOP

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

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.