- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
/** * Construct an asynchronous implementation of AmazonSNSAsync using the current builder configuration. * * @param params * Current builder configuration represented as a parameter object. * @return Fully configured implementation of AmazonSNSAsync. */ @Override protected AmazonSNSAsync build(AwsAsyncClientParams params) { return new AmazonSNSAsyncClient(params); }
/** * The Asynchronous SNS client is used for publishing events to SNS. */ private AmazonSNSAsyncClient createAsyncSNSClient( final Region region, final ExecutorService executor ) { final UsergridAwsCredentialsProvider ugProvider = new UsergridAwsCredentialsProvider(); final AmazonSNSAsyncClient sns = new AmazonSNSAsyncClient( ugProvider.getCredentials(), clientConfiguration, executor ); sns.setRegion( region ); return sns; }
AmazonSNSAsyncClient snsClient = new AmazonSNSAsyncClient();
public AmazonAwsSQSConnector(String awsAccessKey, String awsSecretKey, boolean isSecure, long receiveCheckIntervalMs, boolean isAsync) { super(receiveCheckIntervalMs, isAsync); AWSCredentials awsCredentials = new BasicAWSCredentials(awsAccessKey, awsSecretKey); ClientConfiguration clientConfiguration = new ClientConfiguration(); String proxyHost = System.getProperty("http.proxyHost"); String proxyPort = System.getProperty("http.proxyPort"); if(proxyHost != null){ clientConfiguration.setProxyHost(proxyHost); if(proxyPort != null){ clientConfiguration.setProxyPort(Integer.parseInt(proxyPort)); } } clientConfiguration.setProtocol(isSecure ? Protocol.HTTPS : Protocol.HTTP); if (isAsync) { ExecutorService executorService = Executors.newSingleThreadExecutor(); _amazonSQS = new AmazonSQSAsyncClient(awsCredentials, clientConfiguration, executorService); _amazonSNS = new AmazonSNSAsyncClient(awsCredentials, clientConfiguration, executorService); } else { _amazonSQS = new AmazonSQSClient(awsCredentials, clientConfiguration); _amazonSNS = new AmazonSNSClient(awsCredentials, clientConfiguration); } }