<commit_before>/*   Copyright (c) 2015 Magnet Systems, Inc.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.magnet.mmx.protocol;

/**
 * @hide
 * Common MMX element, namespace and attributes.
 */
public class Constants {
  /**
   * The default domain or service name for MMX server.
   */
  public final static String MMX_DOMAIN = "mmx";
  /**
   * The max length for topic name.
   */
  public final static int MMX_MAX_TOPIC_LEN = 50;
  /**
   * The max length for tag name.
   */
  public final static int MMX_MAX_TAG_LEN = 25;
  /**
   * The minimum user ID length for regular user account.
   */
  public final static int MMX_MIN_USERID_LEN = 5;
  /**
   * The maximum user ID length for regular user account.
   */
  public final static int MMX_MAX_USERID_LEN = 42;
  /**
   * The max payload size in bytes that MMX server supports.  It is not
   * necessary same as what the client allows.
   */
  public final static int MAX_PAYLOAD_SIZE = 2 * 1024 * 1024;
  /**
   * The payload threshold in bytes to switch from RAM to memory-mapped I/O.
   */
  public final static int PAYLOAD_THRESHOLD = 102400;
  /**
   * A delimiter used in multi-tenant environment.
   */
  public final static char APP_ID_DELIMITER = '%';
  /**
   * A flag to control if '@' is allowed in the user ID.
   */
  public final static boolean AT_SIGN_DISALLOWED = false;
  /**
   * The current protocol major version number.
   */
  public final static int MMX_VERSION_MAJOR = 1;
  /**
   * The current protocol minor version number.
   */
  public final static int MMX_VERSION_MINOR = 3;
  /**
   * The elements for MMX.
   */
  public final static String MMX_ELEMENT = "mmx";
  public final static String MMX = MMX_ELEMENT;
  public final static String MMX_APP_REG = MMX_ELEMENT;
  public final static String MMX_DEV_REG = MMX_ELEMENT;
  
  public final static String MMX_MMXMETA = "mmxmeta";
  public final static String MMX_META = "meta";
  public final static String MMX_PAYLOAD = "payload";
  
  /**
   * The default encoding type to be used for binary payload.
   */
  public final static String BASE64 = "base64";
  
  /**
   * The default message type if it is not specified or it is empty.
   */
  public final static String MMX_MTYPE_UNKNOWN = "unknown";
  /**
   * The message type for GeoLocaion.
   */
  public final static String MMX_MTYPE_GEOLOC = "geoloc";
  /**
   * The message type for MMXError.
   */
  public final static String MMX_MTYPE_ERROR = "mmxerror";
  
  // XEP-0184 message delivery receipts
  public final static String XMPP_REQUEST = "request";
  public final static String XMPP_RECEIVED = "received";
  public final static String XMPP_ATTR_ID = "id";
  public final static String XMPP_NS_RECEIPTS = "urn:xmpp:receipts";

  /**
   * The namespaces used in the MMX extension.
   */
  public final static String MMX_NS_APP = "com.magnet:appreg";
  public final static String MMX_NS_DEV = "com.magnet:dev";
  public final static String MMX_NS_USER = "com.magnet:user";
  public final static String MMX_NS_AUTH = "com.magnet:auth";
  public final static String MMX_NS_MSG_ACTION = "com.magnet:msg:action";
  public final static String MMX_NS_MSG_PAYLOAD = "com.magnet:msg:payload";
  public final static String MMX_NS_MSG_STATE = "com.magnet:msg:state";
  public final static String MMX_NS_MSG_ACK = "com.magnet:msg:ack";
  public final static String MMX_NS_MSG_PUSH = "com.magnet:msg:push";
  public final static String MMX_NS_MSG_WAKEUP = "com.magnet:msg:wakeup";
  public final static String MMX_NS_PUBSUB = "com.magnet:pubsub";
  public final static String MMX_NS_CONTEXT = "com.magnet:ctx";

  public final static String MMX_ACTION_CODE_WAKEUP = "w";
  public final static String MMX_ACTION_CODE_PUSH = "p";
  
  /**
   * The attributes used in the MMX extension.
   */
  public final static String MMX_ATTR_COMMAND = "command";
  public final static String MMX_ATTR_CTYPE = "ctype";
  public final static String MMX_ATTR_MTYPE = "mtype";
  public final static String MMX_ATTR_STAMP = "stamp";
  public final static String MMX_ATTR_CHUNK = "chunk";
  public final static String MMX_ATTR_CID = "cid";
  public final static String MMX_ATTR_DST = "dst";
<commit_msg>Add a constant for the msg signal namespace<commit_after>/*   Copyright (c) 2015 Magnet Systems, Inc.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.magnet.mmx.protocol;

/**
 * @hide
 * Common MMX element, namespace and attributes.
 */
public class Constants {
  /**
   * The default domain or service name for MMX server.
   */
  public final static String MMX_DOMAIN = "mmx";
  /**
   * The max length for topic name.
   */
  public final static int MMX_MAX_TOPIC_LEN = 50;
  /**
   * The max length for tag name.
   */
  public final static int MMX_MAX_TAG_LEN = 25;
  /**
   * The minimum user ID length for regular user account.
   */
  public final static int MMX_MIN_USERID_LEN = 5;
  /**
   * The maximum user ID length for regular user account.
   */
  public final static int MMX_MAX_USERID_LEN = 42;
  /**
   * The max payload size in bytes that MMX server supports.  It is not
   * necessary same as what the client allows.
   */
  public final static int MAX_PAYLOAD_SIZE = 2 * 1024 * 1024;
  /**
   * The payload threshold in bytes to switch from RAM to memory-mapped I/O.
   */
  public final static int PAYLOAD_THRESHOLD = 102400;
  /**
   * A delimiter used in multi-tenant environment.
   */
  public final static char APP_ID_DELIMITER = '%';
  /**
   * A flag to control if '@' is allowed in the user ID.
   */
  public final static boolean AT_SIGN_DISALLOWED = false;
  /**
   * The current protocol major version number.
   */
  public final static int MMX_VERSION_MAJOR = 1;
  /**
   * The current protocol minor version number.
   */
  public final static int MMX_VERSION_MINOR = 3;
  /**
   * The elements for MMX.
   */
  public final static String MMX_ELEMENT = "mmx";
  public final static String MMX = MMX_ELEMENT;
  public final static String MMX_APP_REG = MMX_ELEMENT;
  public final static String MMX_DEV_REG = MMX_ELEMENT;
  
  public final static String MMX_MMXMETA = "mmxmeta";
  public final static String MMX_META = "meta";
  public final static String MMX_PAYLOAD = "payload";
  
  /**
   * The default encoding type to be used for binary payload.
   */
  public final static String BASE64 = "base64";
  
  /**
   * The default message type if it is not specified or it is empty.
   */
  public final static String MMX_MTYPE_UNKNOWN = "unknown";
  /**
   * The message type for GeoLocaion.
   */
  public final static String MMX_MTYPE_GEOLOC = "geoloc";
  /**
   * The message type for MMXError.
   */
  public final static String MMX_MTYPE_ERROR = "mmxerror";
  
  // XEP-0184 message delivery receipts
  public final static String XMPP_REQUEST = "request";
  public final static String XMPP_RECEIVED = "received";
  public final static String XMPP_ATTR_ID = "id";
  public final static String XMPP_NS_RECEIPTS = "urn:xmpp:receipts";

  /**
   * The namespaces used in the MMX extension.
   */
  public final static String MMX_NS_APP = "com.magnet:appreg";
  public final static String MMX_NS_DEV = "com.magnet:dev";
  public final static String MMX_NS_USER = "com.magnet:user";
  public final static String MMX_NS_AUTH = "com.magnet:auth";
  public final static String MMX_NS_MSG_ACTION = "com.magnet:msg:action";
  public final static String MMX_NS_MSG_PAYLOAD = "com.magnet:msg:payload";
  public final static String MMX_NS_MSG_STATE = "com.magnet:msg:state";
  public final static String MMX_NS_MSG_ACK = "com.magnet:msg:ack";
  public final static String MMX_NS_MSG_PUSH = "com.magnet:msg:push";
  public final static String MMX_NS_MSG_WAKEUP = "com.magnet:msg:wakeup";
  public final static String MMX_NS_PUBSUB = "com.magnet:pubsub";
  public final static String MMX_NS_CONTEXT = "com.magnet:ctx";
  public static final String MMX_NS_MSG_SIGNAL = "com.magnet:msg:signal";

  public final static String MMX_ACTION_CODE_WAKEUP = "w";
  public final static String MMX_ACTION_CODE_PUSH = "p";
  
  /**
   * The attributes used in the MMX extension.
   */
  public final static String MMX_ATTR_COMMAND = "command";
  public final static String MMX_ATTR_CTYPE = "ctype";
  public final static String MMX_ATTR_MTYPE = "mtype";
  public final static String MMX_ATTR_STAMP = "stamp";
  public final static String MMX_ATTR_CHUNK = "chunk";
  public final static String MMX_ATTR_CID = "cid";
  public final static String MMX_ATTR_DST = "dst";

{'fraction_non_alphanumeric': 0.08429561200923788, 'fraction_numerical': 0.008398068444257821, 'mean_word_length': 3.506622516556291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5895681', 'n_tokens_mistral': 3084, 'n_tokens_neox': 3021, 'n_words': 1083}