List of usage examples for java.rmi RemoteException getMessage
public String getMessage()
From source file:org.wso2.carbon.cloud.gateway.agent.ui.CGAgentAdminClient.java
/** * Determines whether at least one service has been published to specified CSG server. * * @param serverName Name of the CSG sever * @return if there is at least a one service published to the CSG server or false otherwise. * @throws AxisFault in case of an error *///from w w w . j a v a 2 s . c o m public boolean isHasPublishedServices(String serverName) throws AxisFault { boolean isPublished = false; try { isPublished = stub.isHasPublishedServices(serverName); } catch (RemoteException e) { handleException(getI18nString("connect.error", e), e); } catch (Exception e) { handleException(e.getMessage(), e); } return isPublished; }
From source file:org.wso2.carbon.deployment.synchronizer.git.stratos2.S2GitRepositoryManager.java
@Override public RepositoryInformation getUrlInformation(int tenantId) throws DeploymentSynchronizerException { //check in the local cache TenantGitRepositoryContext tenantGitRepoCtx = TenantGitRepositoryContextCache .getTenantRepositoryContextCache().retrieveCachedTenantGitContext(tenantId); if (tenantGitRepoCtx == null) { String errorMsg = "TenantGitRepositoryContext not available for tenant " + tenantId; log.error(errorMsg);//from w w w. j a v a 2 s . c o m handleError(errorMsg); } if (tenantGitRepoCtx.getRemoteRepoUrl() != null) { //available in local cache return new GitRepositoryInformation(tenantGitRepoCtx.getRemoteRepoUrl()); } //not available in the local cache String repositoryUrl = null; try { repositoryUrl = repoInfoServiceClient.getGitRepositoryUrl(tenantId, cartridgeAlias); } catch (RemoteException e) { log.error(e.getMessage()); repositoryUrl = null; } catch (RepositoryInformationServiceException e) { log.error(e.getMessage()); repositoryUrl = null; } log.info("Recieved repo url [" + repositoryUrl + "] for tenant " + tenantId); //cache the url tenantGitRepoCtx.setRemoteRepoUrl(repositoryUrl); TenantGitRepositoryContextCache.getTenantRepositoryContextCache().updateTenantGitRepositoryContext(tenantId, tenantGitRepoCtx); return new GitRepositoryInformation(repositoryUrl); }
From source file:org.wso2.carbon.deployment.synchronizer.git.stratos2.S2GitRepositoryManager.java
@Override public RepositoryInformation getCredentialsInformation(int tenantId) throws DeploymentSynchronizerException { //check in the local cache TenantGitRepositoryContext tenantGitRepoCtx = TenantGitRepositoryContextCache .getTenantRepositoryContextCache().retrieveCachedTenantGitContext(tenantId); if (tenantGitRepoCtx == null) { String errorMsg = "TenantGitRepositoryContext not available for tenant " + tenantId; log.error(errorMsg);//from w ww. j av a2s . c o m handleError(errorMsg); } if (tenantGitRepoCtx.getUsername() != null && tenantGitRepoCtx.getPassword() != null) { //available in local cache return new GitRepositoryInformation(tenantGitRepoCtx.getUsername(), tenantGitRepoCtx.getPassword()); } //not available in the local cache RepositoryCredentials repoCredentials = null; try { repoCredentials = repoInfoServiceClient.getJsonRepositoryInformation(tenantId, cartridgeAlias); } catch (RemoteException e) { log.error(e.getMessage()); repoCredentials = null; } catch (RepositoryInformationServiceException e) { log.error(e.getMessage()); repoCredentials = null; } String userName; String password; if (repoCredentials == null) { return null; } else { userName = repoCredentials.getUserName(); password = repoCredentials.getPassword(); } log.info("Received repository user name [" + userName + "] for tenant " + tenantId); //cache username and password tenantGitRepoCtx.setUsername(userName); tenantGitRepoCtx.setPassword(password); TenantGitRepositoryContextCache.getTenantRepositoryContextCache().updateTenantGitRepositoryContext(tenantId, tenantGitRepoCtx); return new GitRepositoryInformation(userName, password); }
From source file:org.wso2.carbon.identity.authenticator.krb5.ui.Krb5UIAuthenticator.java
public boolean authenticate(Object object) throws AuthenticationException { HttpServletRequest request = (HttpServletRequest) object; String userName = request.getParameter("username"); String password = request.getParameter("password"); try {/*from w w w. j a v a 2 s .co m*/ return authenticate(request, userName, password); } catch (RemoteException e) { throw new AuthenticationException(e.getMessage(), e); } }
From source file:org.wso2.carbon.identity.certificateauthority.ui.client.CAAdminServiceClient.java
/** * Returns the list of keystores//from w ww . j a v a2 s. co m * * @return keystore list * @throws AxisFault */ public String[] getKeyStoreList() throws AxisFault { try { return stub.listKeyAliases(); } catch (RemoteException e) { handleException(e.getMessage(), e); } catch (CAAdminServiceCaException e) { handleException(e.getMessage(), e); } return new String[0]; }
From source file:org.wso2.carbon.identity.claim.metadata.mgt.ui.client.ClaimMetadataAdminClient.java
public ClaimDialectDTO[] getClaimDialects() throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException { try {/*from w w w .ja va 2 s .c o m*/ return stub.getClaimDialects(); } catch (RemoteException e) { log.error(e.getMessage(), e); throw e; } catch (ClaimMetadataManagementServiceClaimMetadataException e) { log.error(e.getMessage(), e); throw e; } }
From source file:org.wso2.carbon.identity.claim.metadata.mgt.ui.client.ClaimMetadataAdminClient.java
public void addClaimDialect(ClaimDialectDTO externalClaimDialect) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException { try {/*from ww w.j av a 2 s . c o m*/ stub.addClaimDialect(externalClaimDialect); } catch (RemoteException e) { log.error(e.getMessage(), e); throw e; } catch (ClaimMetadataManagementServiceClaimMetadataException e) { log.error(e.getMessage(), e); throw e; } }
From source file:org.wso2.carbon.identity.claim.metadata.mgt.ui.client.ClaimMetadataAdminClient.java
public void removeClaimDialect(String externalClaimDialect) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException { try {//w w w . j a va2s .c o m ClaimDialectDTO claimDialect = new ClaimDialectDTO(); claimDialect.setClaimDialectURI(externalClaimDialect); stub.removeClaimDialect(claimDialect); } catch (RemoteException e) { log.error(e.getMessage(), e); throw e; } catch (ClaimMetadataManagementServiceClaimMetadataException e) { log.error(e.getMessage(), e); throw e; } }
From source file:org.wso2.carbon.identity.claim.metadata.mgt.ui.client.ClaimMetadataAdminClient.java
public LocalClaimDTO[] getLocalClaims() throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException { try {/*w w w. ja v a 2 s. c o m*/ return stub.getLocalClaims(); } catch (RemoteException e) { log.error(e.getMessage(), e); throw e; } catch (ClaimMetadataManagementServiceClaimMetadataException e) { log.error(e.getMessage(), e); throw e; } }
From source file:org.wso2.carbon.identity.claim.metadata.mgt.ui.client.ClaimMetadataAdminClient.java
public void addLocalClaim(LocalClaimDTO localCLaim) throws RemoteException, ClaimMetadataManagementServiceClaimMetadataException { try {/*from w w w. j a v a2s .co m*/ stub.addLocalClaim(localCLaim); } catch (RemoteException e) { log.error(e.getMessage(), e); throw e; } catch (ClaimMetadataManagementServiceClaimMetadataException e) { log.error(e.getMessage(), e); throw e; } }