Package com.opengamma.livedata.msg

Examples of com.opengamma.livedata.msg.SubscriptionType


  protected void handleSubscriptionRequest(Collection<SubscriptionHandle> subHandles) {
    ArgumentChecker.notEmpty(subHandles, "Subscription handle collection");
   
    // Determine common user and subscription type
    UserPrincipal user = null;
    SubscriptionType type = null;
   
    ArrayList<LiveDataSpecification> specs = new ArrayList<>();
    for (SubscriptionHandle subHandle : subHandles) {

      // TODO - as a LiveDataSpec is immutable, why do we copy rather than just use it?
      specs.add(new LiveDataSpecification(subHandle.getRequestedSpecification()));
     
      if (user == null) {
        user = subHandle.getUser();
      } else if (!user.equals(subHandle.getUser())) {
        throw new OpenGammaRuntimeException("Not all usernames are equal");       
      }
     
      if (type == null) {
        type = subHandle.getSubscriptionType();
      } else if (!type.equals(subHandle.getSubscriptionType())) {
        throw new OpenGammaRuntimeException("Not all subscription types are equal");
      }
    }
   
    // Build request message
View Full Code Here

TOP

Related Classes of com.opengamma.livedata.msg.SubscriptionType

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.