Package com.cosmicpush.app.domain.requests

Examples of com.cosmicpush.app.domain.requests.ApiRequest


        null, BeanUtils.toMap("smtp-test:true"));

    String remoteAddress = config.getRequest().getRemoteAddr();
    InetAddress inetAddress = InetAddress.getByName(remoteAddress);

    ApiRequest apiRequest = new ApiRequest(apiClient, action, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    new SmtpEmailDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, action).run();

    msg = String.format("Test message sent to %s:\n%s", recipient, msg);
View Full Code Here


  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path(EndPoints.PUSH_NOTIFICATION)
  public Response sendNotification(NotificationPush push) throws Exception {

    ApiRequest apiRequest = new ApiRequest(apiClient, push, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    NotificationDelegate delegate = new NotificationDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, push);
    new Thread(delegate).start();
View Full Code Here

  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path(EndPoints.PUSH_USER_EVENT)
  public Response sendUserEvent(UserEventPush push) throws Exception {

    ApiRequest apiRequest = new ApiRequest(apiClient, push, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    UserEventDelegate delegate = new UserEventDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, push);
    new Thread(delegate).start();
View Full Code Here

  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path(EndPoints.PUSH_IM)
  public Response sendGoogleTalk(ImPush push) throws Exception {

    ApiRequest apiRequest = new ApiRequest(apiClient, push, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    GoolgeTalkDelegate delegate = new GoolgeTalkDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, push);
    new Thread(delegate).start();
View Full Code Here

  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path(EndPoints.PUSH_EMAIL)
  public Response sendEmailMessage(EmailPush push) throws Exception {

    ApiRequest apiRequest = new ApiRequest(apiClient, push, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    if (useAwsEmail()) {
      AwsEmailDelegate delegate = new AwsEmailDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, push);
      new Thread(delegate).start();
View Full Code Here

  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path(EndPoints.PUSH_EMAIL_TO_SMS)
  public Response sendEmailToSmsMessage(EmailToSmsPush push) throws Exception {

    ApiRequest apiRequest = new ApiRequest(apiClient, push, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    if (useAwsEmail()) {
      AwsSmsDelegate delegate = new AwsSmsDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, push);
      new Thread(delegate).start();
View Full Code Here

                                     null, BeanUtils.toMap("aws-test:true"));

    String remoteAddress = config.getRequest().getRemoteAddr();
    InetAddress inetAddress = InetAddress.getByName(remoteAddress);

    ApiRequest apiRequest = new ApiRequest(apiClient, action, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    new AwsEmailDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, action).run();

    msg = String.format("Test message sent to %s:\n%s", recipient, msg);
View Full Code Here

    ImPush action = ImPush.googleTalk(recipient, msg, null);

    String remoteAddress = config.getRequest().getRemoteAddr();
    InetAddress inetAddress = InetAddress.getByName(remoteAddress);

    ApiRequest apiRequest = new ApiRequest(apiClient, action, inetAddress);
    config.getApiRequestStore().create(apiRequest);

    new GoolgeTalkDelegate(config.getObjectMapper(), config.getApiRequestStore(), account, apiClient, apiRequest, action).run();

    msg = String.format("Test message sent to %s:\n%s", recipient, msg);
View Full Code Here

  @GET
  @Path("/{apiRequestId}")
  public Viewable viewNotifications(@PathParam("apiRequestId") String apiRequestId) throws Exception {

    ApiRequest request = config.getApiRequestStore().getByApiRequestId(apiRequestId);
    NotificationPush notification = request.getNotificationPush();

    ApiClientNotificationModel model = new ApiClientNotificationModel(account, apiClient, request, notification);
    return new Viewable("/manage/api-notification.jsp", model);
  }
View Full Code Here

  @GET
  @Path("/{apiRequestId}")
  public Viewable viewEmailEvent(@PathParam("apiRequestId") String apiRequestId) throws Exception {

    ApiRequest apiRequest = config.getApiRequestStore().getByApiRequestId(apiRequestId);
    EmailPush email = apiRequest.getEmailPush();

    EmailModel model = new EmailModel(account, apiClient, apiRequest, email);
    return new Viewable("/manage/api-email.jsp", model);
  }
View Full Code Here

TOP

Related Classes of com.cosmicpush.app.domain.requests.ApiRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.