summaryrefslogtreecommitdiffstats
path: root/openstack-client/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'openstack-client/src/main/java')
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java12
-rw-r--r--openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java12
2 files changed, 12 insertions, 12 deletions
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
index c68a308..1e2dfcc 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/Entity.java
@@ -24,6 +24,12 @@ public class Entity<T> {
private String contentType;
+ public Entity(T entity, String contentType) {
+ super();
+ this.entity = entity;
+ this.contentType = contentType;
+ }
+
public static <T> Entity<T> json(T entity) {
return new Entity<>(entity, "application/json");
}
@@ -32,12 +38,6 @@ public class Entity<T> {
return new Entity<>(entity, "application/octet-stream");
}
- public Entity(T entity, String contentType) {
- super();
- this.entity = entity;
- this.contentType = contentType;
- }
-
/**
* @return the entity
*/
diff --git a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
index 23ee8dc..a111975 100644
--- a/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
+++ b/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackClient.java
@@ -29,38 +29,38 @@ public class OpenStackClient {
protected OpenStackTokenProvider tokenProvider;
- protected static int AUTHENTICATION_RETRIES = 1;
+ protected static int authenticationRetries = 1;
protected OpenStackClientConnector connector;
protected Properties properties = new Properties();
- protected static OpenStackClientConnector DEFAULT_CONNECTOR;
+ protected static OpenStackClientConnector defaultConnector;
static {
ServiceLoader<OpenStackClientConnector> connectorLoader;
connectorLoader = ServiceLoader.load(OpenStackClientConnector.class);
for (OpenStackClientConnector clientConnector : connectorLoader) {
- DEFAULT_CONNECTOR = clientConnector;
+ defaultConnector = clientConnector;
break;
}
}
public OpenStackClient(String endpoint) {
this.endpoint = endpoint;
- this.connector = DEFAULT_CONNECTOR;
+ this.connector = defaultConnector;
}
public OpenStackClient(String endpoint, OpenStackClientConnector connector) {
this.endpoint = endpoint;
- this.connector = (connector == null) ? DEFAULT_CONNECTOR : connector;
+ this.connector = (connector == null) ? defaultConnector : connector;
}
public <T> OpenStackResponse request(OpenStackRequest<T> request) {
OpenStackResponseException authException = null;
- for (int i = 0; i <= AUTHENTICATION_RETRIES; i++) {
+ for (int i = 0; i <= authenticationRetries; i++) {
request.endpoint(endpoint);
if (tokenProvider != null) {