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 LongDEFAULT_CONNECT_TIMEOUTstatic LongDEFAULT_READ_TIMEOUT
-
Constructor Summary
Constructors Constructor Description RestConnection(C context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description APIKeyAuthenticationgetAPIAuthenticationType()Returns theAuthenticationTypefrom the selected "auth" connection field.AuthenticationTypegetAuthenticationType()Returns theAuthenticationTypefrom the selected "auth" connection field.StringgetAWSAccessKey()Returns the AWS access key value from "awsAccessKey" connection field.StringgetAWSRegion()Returns the AWS Service from the "awsRegion" connection field value, if the selected field is not "CUSTOM".StringgetAWSSecretKey()Returns the AWS secret key value from "awsSecretKey" connection field.StringgetAWSService()Returns the AWS Service from the "awsService" connection field value, if the selected field is not "CUSTOM".protected StringgetConnectionProperty(String key)intgetConnectTimeout()Returns the connection property for "connectTimeout" fieldStringgetCookieScope()Returns the value of the "Cookie Scope" connection property.StringgetCustomAuthCredentials()Returns the connection property for "customAuthCredentials" fieldStringgetDomain()Returns the connection property for "domain" field.StringgetHttpMethod()Gets the selected HTTP method from the connector action / operation field.OAuth2ContextgetOAuthContext()Fetches the OAuth2Context from the "oauthContext" connection field.StringgetPassword()Returns the connection property for "password" fieldbooleangetPreemptive()Retrieves the "preemptive" connection property valuePrivateKeyStoregetPrivateKeyStore()Returns the connection property "privateCertificate" as aPrivateKeyStorePublicKeyStoregetPublicKeyStore()Returns the connection property "publicCertificate" as aPublicKeyStoreintgetReadTimeout()Returns the connection property for "readTime" fieldURLgetUrl()Gets the connection URL from the connection property "url"StringgetUsername()Returns the connection property for "username" fieldStringgetWorkstation()Returns the connection property for "workstation" field.booleanisConnectionPoolingEnabled()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 theAuthenticationTypefrom the selected "auth" connection field.- Returns:
- the AuthenticationType
-
getAPIAuthenticationType
public APIKeyAuthentication getAPIAuthenticationType()
Returns theAuthenticationTypefrom 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
-
-