Package org.destecs.protocol

Examples of org.destecs.protocol.ProxyICoSimProtocol


  }

  private ProxyICoSimProtocol connect(Simulator simulator, URL url)
      throws SimulationException
  {
    ProxyICoSimProtocol protocolProxy = null;
    try
    {
      XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
      config.setServerURL(url);

      // 0 sec timeout = no timeout and fixes Bert problem
      config.setReplyTimeout(000);// 5 sec time out

      XmlRpcClient client = new XmlRpcClient();
      client.setConfig(config);

      if (SimulationEngine.eclipseEnvironment)
      {
        client.setTransportFactory(new CustomSAXParserTransportFactory(client));
      }

      clients.add(client);
      // add factory for annotations for generated protocol
      AnnotationClientFactory factory = new AnnotationClientFactory(client);

      ICoSimProtocol protocol = (ICoSimProtocol) factory.newInstance(ICoSimProtocol.class);

      protocolProxy = new ProxyICoSimProtocol(protocol);
    } catch (Exception e)
    {
      abort(simulator, "Connect faild to: " + url, e);
    }
    return protocolProxy;
View Full Code Here


import org.destecs.protocol.ProxyICoSimProtocol;

public class Clp20SimUtility {
  static public ProxyICoSimProtocol connect(URL url)
      throws SimulationException {
    ProxyICoSimProtocol protocolProxy = null;
    try {
      XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
      config.setServerURL(url);
      // config.setReplyTimeout(5000);// 5 sec time out

      XmlRpcClient client = new XmlRpcClient();
      client.setConfig(config);

      if (SimulationEngine.eclipseEnvironment) {
        client.setTransportFactory(new CustomSAXParserTransportFactory(
            client));
      }

      // clients.add(client);
      // add factory for annotations for generated protocol
      AnnotationClientFactory factory = new AnnotationClientFactory(
          client);

      ICoSimProtocol protocol = (ICoSimProtocol) factory
          .newInstance(ICoSimProtocol.class);

      protocolProxy = new ProxyICoSimProtocol(protocol);
    } catch (Exception e) {

    }
    return protocolProxy;
  }
View Full Code Here

      } catch (IOException e) {
        return null;
      }
    }
   
    ProxyICoSimProtocol protocol = null;
    try
    {
      protocol = Clp20SimUtility.connect(new URL(ctUrl));
    } catch (MalformedURLException e1)
    {
     
    }catch(SimulationException e1s)
    {
     
    }
   
   
    if(protocol == null)
    {
      return null;
    }
   
    boolean couldLoad = false;
    CtModelConfig model = new CtModelConfig(ctFile);
    List<LoadpropertiesStructParam> arguments = new Vector<LoadpropertiesStructParam>();
    for (Entry<String, String> entry : model.arguments.entrySet())
    {
      arguments.add(new LoadpropertiesStructParam(entry.getValue(), entry.getKey()));
    }

    for (int i = 0; i < RETRIES; i++)
    {
      try
      {
        protocol.load(arguments);
        couldLoad = true;
        break;
      } catch (Exception e)
      {
        try
View Full Code Here

    protected IStatus run(IProgressMonitor monitor)
    {

      try
      {
        ProxyICoSimProtocol protocol = Launch20simUtility.launch20sim(ctFile, ctUrl,remote);
        if(protocol == null)
        {
          return new Status(IStatus.ERROR, DestecsDebugPlugin.PLUGIN_ID, "Populating the tables failed");
        }
       
View Full Code Here

    @Override
    protected IStatus run(IProgressMonitor monitor)
    {
      try
      {
        ProxyICoSimProtocol protocol = Launch20simUtility.launch20sim(ctFile, ctUrl,remote);
        if(protocol == null)
        {
          return new Status(IStatus.ERROR, DestecsDebugPlugin.PLUGIN_ID, "Populating the tables failed");
        }
       
View Full Code Here

TOP

Related Classes of org.destecs.protocol.ProxyICoSimProtocol

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.