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.WebhookRequestNested 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 TypeFieldDescriptionbooleanprivate static final org.slf4j.Loggerfinal List<GatewayService.SmsRequest> Fields inherited from class ch.rswk.meta.engine.GatewayService
SMS_MESSAGE_MAX_LENGTHFields 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> voidreset()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, startUpMethods inherited from class ch.rswk.meta.engine.AbstractEngineIdleService
configClass, configReference, onConfigWatcherNotification, serviceId, serviceNameMethods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, startAsync, state, stopAsync, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.rswk.meta.engine.EngineServices.ConfigurableService
config, handleConfigWatcherNotification, onConfigChangedMethods 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:
invokeWebhookin classGatewayService
-
sendEmail
public com.google.common.util.concurrent.ListenableFuture<GatewayService.DeliveryReply> sendEmail(@Nullable String emailReplyTo, String emailSender, GatewayService.EmailRequest request) - Overrides:
sendEmailin classGatewayService
-
sendSms
public com.google.common.util.concurrent.ListenableFuture<GatewayService.DeliveryReply> sendSms(GatewayService.SmsRequest request) - Overrides:
sendSmsin classGatewayService
-
checkRemainingSms
- Overrides:
checkRemainingSmsin classGatewayService
-
reset
public void reset()
-