<commit_before>package com.backendless.servercode.extension;

import com.backendless.DeviceRegistration;
import com.backendless.messaging.*;
import com.backendless.servercode.ExecutionResult;
import com.backendless.servercode.RunnerContext;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ivanlappo
 * Date: 5/20/13
 * Time: 12:40 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class MessagingExtender
{
  public MessagingExtender()
  {
  }

  public void beforePublish( RunnerContext context, Object Message, PublishOptions publishOptions,
                             DeliveryOptions deliveryOptions ) throws Exception
  {
  }

  public MessageStatus afterPublish( RunnerContext context, Object Message, PublishOptions publishOptions,
                                     DeliveryOptions deliveryOptions,
                                     ExecutionResult<MessageStatus> status ) throws Exception
  {
    return status.getResult();
  }

  public void beforeSubscribe( RunnerContext context, String subscriptionId,
                               SubscriptionOptions options ) throws Exception
  {
  }

  public String afterSubscribe( RunnerContext context, String subscriptionId, SubscriptionOptions options,
                                ExecutionResult<String> subscriberId ) throws Exception
  {
    return subscriberId.getResult();
  }

  public void beforePoll( RunnerContext context ) throws Exception
  {
  }

  public List<Message> afterPoll( RunnerContext context, ExecutionResult<List<Message>> messages ) throws Exception
  {
    return messages.getResult();
  }<commit_msg>BKNDLSS-5046 poll event does not have subscriptionId in the signature<commit_after>package com.backendless.servercode.extension;

import com.backendless.DeviceRegistration;
import com.backendless.messaging.*;
import com.backendless.servercode.ExecutionResult;
import com.backendless.servercode.RunnerContext;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ivanlappo
 * Date: 5/20/13
 * Time: 12:40 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class MessagingExtender
{
  public MessagingExtender()
  {
  }

  public void beforePublish( RunnerContext context, Object Message, PublishOptions publishOptions,
                             DeliveryOptions deliveryOptions ) throws Exception
  {
  }

  public MessageStatus afterPublish( RunnerContext context, Object Message, PublishOptions publishOptions,
                                     DeliveryOptions deliveryOptions,
                                     ExecutionResult<MessageStatus> status ) throws Exception
  {
    return status.getResult();
  }

  public void beforeSubscribe( RunnerContext context, String subscriptionId,
                               SubscriptionOptions options ) throws Exception
  {
  }

  public String afterSubscribe( RunnerContext context, String subscriptionId, SubscriptionOptions options,
                                ExecutionResult<String> subscriberId ) throws Exception
  {
    return subscriberId.getResult();
  }

  public void beforePoll( RunnerContext context, String subscriptionId ) throws Exception
  {
  }

  public List<Message> afterPoll( RunnerContext context, String subscriptionId, ExecutionResult<List<Message>> messages ) throws Exception
  {
    return messages.getResult();
  }
{'fraction_non_alphanumeric': 0.06547269524368761, 'fraction_numerical': 0.0064591896652965355, 'mean_word_length': 3.170134638922889, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2891539', 'n_tokens_mistral': 864, 'n_tokens_neox': 817, 'n_words': 237}