Package ch.rswk.meta.engine.test
Class GatewayMockService
java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
ch.rswk.meta.engine.AbstractEngineIdleService<GatewayService.GatewayServiceConfig>
ch.rswk.meta.engine.GatewayService
ch.rswk.meta.engine.test.GatewayMockService
- All Implemented Interfaces:
EngineServices.ConfigurableService<GatewayService.GatewayServiceConfig>
,EngineServices.InfoProvidingService
,com.google.common.util.concurrent.Service
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ch.rswk.meta.engine.GatewayService
GatewayService.DeliveryReply, GatewayService.DeliveryRequest, GatewayService.EmailRequest, GatewayService.EmailRequestFile, GatewayService.GatewayServiceConfig, GatewayService.SmsRequest, GatewayService.WebhookRequest
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
private static final org.slf4j.Logger
final List
<GatewayService.SmsRequest> Fields inherited from class ch.rswk.meta.engine.GatewayService
SMS_MESSAGE_MAX_LENGTH
Fields inherited from class ch.rswk.meta.engine.AbstractEngineIdleService
runtime
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture
<Integer> com.google.common.util.concurrent.ListenableFuture
<GatewayService.DeliveryReply> void
reset()
com.google.common.util.concurrent.ListenableFuture
<GatewayService.DeliveryReply> sendEmail
(@Nullable String emailReplyTo, String emailSender, GatewayService.EmailRequest request) com.google.common.util.concurrent.ListenableFuture
<GatewayService.DeliveryReply> sendSms
(GatewayService.SmsRequest request) Methods inherited from class ch.rswk.meta.engine.GatewayService
httpClient, sendEmail, shutDown, startUp
Methods inherited from class ch.rswk.meta.engine.AbstractEngineIdleService
configClass, configReference, onConfigWatcherNotification, serviceId, serviceName
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, startAsync, state, stopAsync, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.rswk.meta.engine.EngineServices.ConfigurableService
config, handleConfigWatcherNotification, onConfigChanged
Methods inherited from interface ch.rswk.meta.engine.EngineServices.InfoProvidingService
getServiceInfo
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
receivedEmail
-
receivedSms
-
receivedWebhook
-
delivered
public boolean delivered -
emailLatch
-
smsLatch
-
webhookLatch
-
-
Constructor Details
-
GatewayMockService
-
-
Method Details
-
invokeWebhook
public com.google.common.util.concurrent.ListenableFuture<GatewayService.DeliveryReply> invokeWebhook(GatewayService.WebhookRequest request) - Overrides:
invokeWebhook
in classGatewayService
-
sendEmail
public com.google.common.util.concurrent.ListenableFuture<GatewayService.DeliveryReply> sendEmail(@Nullable String emailReplyTo, String emailSender, GatewayService.EmailRequest request) - Overrides:
sendEmail
in classGatewayService
-
sendSms
public com.google.common.util.concurrent.ListenableFuture<GatewayService.DeliveryReply> sendSms(GatewayService.SmsRequest request) - Overrides:
sendSms
in classGatewayService
-
checkRemainingSms
- Overrides:
checkRemainingSms
in classGatewayService
-
reset
public void reset()
-