Package com.boomi.common.rest
Class RestConnection<C extends BrowseContext>
- java.lang.Object
-
- com.boomi.connector.util.BaseConnection<C>
-
- com.boomi.common.rest.RestConnection<C>
-
- Direct Known Subclasses:
OpenAPIConnection
,RestOperationConnection
public class RestConnection<C extends BrowseContext> extends BaseConnection<C>
-
-
Field Summary
Fields Modifier and Type Field Description static Long
DEFAULT_CONNECT_TIMEOUT
static Long
DEFAULT_READ_TIMEOUT
-
Constructor Summary
Constructors Constructor Description RestConnection(C context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description APIKeyAuthentication
getAPIAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.AuthenticationType
getAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.String
getAWSAccessKey()
Returns the AWS access key value from "awsAccessKey" connection field.String
getAWSRegion()
Returns the AWS Service from the "awsRegion" connection field value, if the selected field is not "CUSTOM".String
getAWSSecretKey()
Returns the AWS secret key value from "awsSecretKey" connection field.String
getAWSService()
Returns the AWS Service from the "awsService" connection field value, if the selected field is not "CUSTOM".protected String
getConnectionProperty(String key)
int
getConnectTimeout()
Returns the connection property for "connectTimeout" fieldString
getCookieScope()
Returns the value of the "Cookie Scope" connection property.String
getCustomAuthCredentials()
Returns the connection property for "customAuthCredentials" fieldString
getDomain()
Returns the connection property for "domain" field.String
getHttpMethod()
Gets the selected HTTP method from the connector action / operation field.OAuth2Context
getOAuthContext()
Fetches the OAuth2Context from the "oauthContext" connection field.String
getPassword()
Returns the connection property for "password" fieldboolean
getPreemptive()
Retrieves the "preemptive" connection property valuePrivateKeyStore
getPrivateKeyStore()
Returns the connection property "privateCertificate" as aPrivateKeyStore
PublicKeyStore
getPublicKeyStore()
Returns the connection property "publicCertificate" as aPublicKeyStore
int
getReadTimeout()
Returns the connection property for "readTime" fieldURL
getUrl()
Gets the connection URL from the connection property "url"String
getUsername()
Returns the connection property for "username" fieldString
getWorkstation()
Returns the connection property for "workstation" field.boolean
isConnectionPoolingEnabled()
Retrieves the "enableConnectionPooling" connection property value-
Methods inherited from class com.boomi.connector.util.BaseConnection
generateConnectionInfo, generateConnectionInfo, getConnector, getContext, getOperationContext
-
-
-
-
Constructor Detail
-
RestConnection
public RestConnection(C context)
-
-
Method Detail
-
getUrl
public URL getUrl()
Gets the connection URL from the connection property "url"- Returns:
- the URL
-
getHttpMethod
public String getHttpMethod()
Gets the selected HTTP method from the connector action / operation field.- Returns:
- the http method
-
getDomain
public String getDomain()
Returns the connection property for "domain" field. This is used for NTLM purposes.- Returns:
- the domain connection property
-
getWorkstation
public String getWorkstation()
Returns the connection property for "workstation" field. This is used for NTLM purposes.- Returns:
- the workstation connection property
-
getUsername
public String getUsername()
Returns the connection property for "username" field- Returns:
- the Username
-
getPassword
public String getPassword()
Returns the connection property for "password" field- Returns:
- the password
-
getCustomAuthCredentials
public String getCustomAuthCredentials()
Returns the connection property for "customAuthCredentials" field- Returns:
- the customAuthCredentials
-
getPrivateKeyStore
public PrivateKeyStore getPrivateKeyStore()
Returns the connection property "privateCertificate" as aPrivateKeyStore
- Returns:
- the PrivateKeyStore
-
getPublicKeyStore
public PublicKeyStore getPublicKeyStore()
Returns the connection property "publicCertificate" as aPublicKeyStore
- Returns:
- the PublicKeyStore
-
getCookieScope
public String getCookieScope()
Returns the value of the "Cookie Scope" connection property.
-
getPreemptive
public boolean getPreemptive()
Retrieves the "preemptive" connection property value- Returns:
- true if preemptive checkbox is checked, false otherwise
-
getOAuthContext
public OAuth2Context getOAuthContext()
Fetches the OAuth2Context from the "oauthContext" connection field.- Returns:
- the OAuth2Context
-
getAuthenticationType
public AuthenticationType getAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.- Returns:
- the AuthenticationType
-
getAPIAuthenticationType
public APIKeyAuthentication getAPIAuthenticationType()
Returns theAuthenticationType
from the selected "auth" connection field.- Returns:
- the AuthenticationType
-
getAWSAccessKey
public String getAWSAccessKey()
Returns the AWS access key value from "awsAccessKey" connection field.- Returns:
- the AWS Access Key
-
getAWSSecretKey
public String getAWSSecretKey()
Returns the AWS secret key value from "awsSecretKey" connection field.- Returns:
- the AWS secret Key
-
getAWSService
public String getAWSService()
Returns the AWS Service from the "awsService" connection field value, if the selected field is not "CUSTOM". Otherwise, returns the "customAwsService" connection field value.- Returns:
- the AWS Service
-
getAWSRegion
public String getAWSRegion()
Returns the AWS Service from the "awsRegion" connection field value, if the selected field is not "CUSTOM". Otherwise, returns the "customAwsRegion" connection field value.- Returns:
- the AWS Service
-
isConnectionPoolingEnabled
public boolean isConnectionPoolingEnabled()
Retrieves the "enableConnectionPooling" connection property value- Returns:
- true if Enable Connection Pooling checkbox is checked, false otherwise
-
getConnectTimeout
public int getConnectTimeout()
Returns the connection property for "connectTimeout" field- Returns:
- the Connection Timeout
-
getReadTimeout
public int getReadTimeout()
Returns the connection property for "readTime" field- Returns:
- the Read Timeout
-
-