Package cartago.infrastructure

Examples of cartago.infrastructure.ICartagoInfrastructureLayer


   */
  public static synchronized void installInfrastructureLayer(String type) throws CartagoException {
    if (type.equals("default")){
      type = defaultInfraLayer;
    }
    ICartagoInfrastructureLayer service = infraLayers.get(type);
    if (service == null){
      try {
        Class<ICartagoInfrastructureLayer> serviceClass = (Class<ICartagoInfrastructureLayer>) Class.forName("cartago.infrastructure."+type+".CartagoInfrastructureLayer");
        service = serviceClass.newInstance();
        infraLayers.put(type, service);
View Full Code Here


   */
  public static synchronized void startInfrastructureService(String type, String address) throws CartagoException {
    if (type.equals("default")){
      type = defaultInfraLayer;
    }
    ICartagoInfrastructureLayer service = infraLayers.get(type);
    if (service != null){
      try {
        service.startService(instance,address);
      } catch (Exception ex){
        throw new CartagoException("Infrastructure layer service failure: "+type);
      }
    } else {
      throw new CartagoException("Infrastructure layer "+type+"not installed");
View Full Code Here

  static synchronized ICartagoContext joinRemoteWorkspace(String wspName, String address, String protocol, AgentCredential cred, ICartagoCallback eventListener) throws cartago.security.SecurityException, CartagoException{
    try {
      if ((protocol == null) || (protocol.equals("default"))){
        protocol = defaultInfraLayer;
      }
      ICartagoInfrastructureLayer service = infraLayers.get(protocol);
      ICartagoContext ctx = service.joinRemoteWorkspace(wspName, address, cred, eventListener);
      LinkedNodeInfo nodeInfo = new LinkedNodeInfo(ctx.getWorkspaceId().getNodeId(), protocol, address);
      boolean exists = false;
      for(LinkedNodeInfo tempNodeInfo : linkedNodes) {
        if(tempNodeInfo.equals(nodeInfo)) {
          exists = true;
View Full Code Here

        if (targetId.getWorkspaceId().getNodeId().equals(info.getNodeId())){
          String support = info.getProtocol();
          if (support==null || support.equals("default")){
            support = defaultInfraLayer;
          }
          ICartagoInfrastructureLayer service = infraLayers.get(support);
          return service.execRemoteInterArtifactOp(callback, callbackId, userId, srcId, targetId, info.getAddress(), op, timeout, test);
        }
      }
      throw new CartagoException("Inter-artifact op failed: target node not linked");
    } catch (Exception ex){
      ex.printStackTrace();
View Full Code Here

  public static synchronized void registerLoggerToRemoteWsp(String wspName, String address, String protocol, ICartagoLogger logger) throws CartagoException {
    try {
      if ((protocol == null) || (protocol.equals("default"))){
        protocol = defaultInfraLayer;
      }
      ICartagoInfrastructureLayer service = infraLayers.get(protocol);
      service.registerLoggerToRemoteWsp(wspName, address, logger);
    } catch (CartagoInfrastructureLayerException ex) {
      ex.printStackTrace();
      throw new CartagoException("Registering logger at "+wspName+"@"+address+" failed ");
    }
  }
View Full Code Here

TOP

Related Classes of cartago.infrastructure.ICartagoInfrastructureLayer

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.