Package org.apache.airavata.registry.api

Examples of org.apache.airavata.registry.api.Gateway


     }

    private GFac getGfac()throws TException{
        try {
            return new BetterGfacImpl(registry, null,
                                AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()),
                                        new AiravataUser(getAiravataUserName())),zk,publisher);
        } catch (RegException e) {
            throw new TException("Error initializing gfac instance",e);
        } catch (AiravataConfigurationException e) {
            throw new TException("Error initializing gfac instance",e);
View Full Code Here


//        } catch (IOException e) {
//            e.printStackTrace();
//        }
        try {
          username=ServerSettings.getSystemUser();
            registry = AiravataRegistryFactory.getRegistry(new Gateway(ServerSettings.getSystemUserGateway()),
                    new AiravataUser(username));
        } catch (AiravataConfigurationException e) {
            log.error("Error initializing AiravataRegistry2");
        } catch (RegAccessorNotFoundException e) {
            log.error("Error initializing AiravataRegistry2");
View Full Code Here

     }

    private GFac getGfac()throws TException{
        try {
            return new GFacImpl(registry, null,
                                AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()),
                                        new AiravataUser(getAiravataUserName())));
        } catch (RegException e) {
            throw new TException("Error initializing gfac instance",e);
        } catch (AiravataConfigurationException e) {
            throw new TException("Error initializing gfac instance",e);
View Full Code Here

    private static final Logger logger = LoggerFactory.getLogger(AiravataServerHandler.class);

  AiravataRegistry2 registry;
  private AiravataRegistry2 getRegistry() throws RegException, AiravataConfigurationException{
     if (registry==null){
       registry = AiravataRegistryFactory.getRegistry(new Gateway("default"), new AiravataUser("admin"));
     }
    return registry;
  }
View Full Code Here

        try {
            /* Initializing the OrchestratorConfiguration object */
          orchestratorConfiguration = OrchestratorUtils.loadOrchestratorConfiguration();
            setGatewayProperties();
            /* initializing the Orchestratorcontext object */
            airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()), new AiravataUser(getAiravataUserName()));
            // todo move this code to gfac service mode Jobsubmitter,
            // todo this is ugly, SHOULD fix these isEmbedded mode code from Orchestrator
            if (!orchestratorConfiguration.isEmbeddedMode()) {
                Map<String, Integer> gfacNodeList = airavataRegistry.getGFACNodeList();
                if (gfacNodeList.size() == 0) {
View Full Code Here

  }

  public static AiravataRegistry2 getRegistry(URI registryURI,
      String gateway, String username, PasswordCallback callback)
      throws RegException, AiravataConfigurationException {
    return AiravataRegistryFactory.getRegistry(registryURI, new Gateway(
        gateway), new AiravataUser(username), callback);
  }
View Full Code Here

      ExperimentResource resource) {
    AiravataExperiment e = new AiravataExperiment();
    e.setExperimentId(resource.getExpID());
    e.setUser(new AiravataUser(resource.getWorker().getUser()));
    e.setSubmittedDate(new Date(resource.getSubmittedDate().getTime()));
    e.setGateway(new Gateway(resource.getGateway().getGatewayName()));
    e.setProject(new WorkspaceProject(getProjName(resource.getProject().getName()), this));
    return e;
  }
View Full Code Here

                                  @FormParam("submittedDate") String submittedDate) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            AiravataExperiment experiment = new AiravataExperiment();
            experiment.setExperimentId(experimentID);
            Gateway gateway = airavataRegistry.getGateway();
            AiravataUser airavataUser = airavataRegistry.getAiravataUser();
            experiment.setGateway(gateway);
            experiment.setUser(airavataUser);
            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date formattedDate = dateFormat.parse(submittedDate);
View Full Code Here

        try {
          AiravataUtils.setExecutionAsServer();
            ServletContext servletContext = servletContextEvent.getServletContext();
            String gatewayID = ServerSettings.getSystemUserGateway();
            String user = ServerSettings.getSystemUser();
            Gateway gateway =  new Gateway(gatewayID);

            servletContext.setAttribute(RestServicesConstants.GATEWAY, gateway);
            servletContext.setAttribute(RestServicesConstants.AIRAVATA_USER, user);
            servletContext.setAttribute(
                    RestServicesConstants.AIRAVATA_REGISTRY_POOL,new RegistryInstancesPool(100));
View Full Code Here

    @Path(ResourcePathConstants.BasicRegistryConstants.GET_GATEWAY)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getGateway() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            Gateway gateway = airavataRegistry.getGateway();
            if (gateway != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(gateway);
                return builder.build();
            } else {
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.Gateway

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.