Android Open Source - Soutils Parameters






From Project

Back to project page Soutils.

License

The source code is released under:

MIT License

If you think the Android project Soutils listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/* The MIT License (MIT)
//from w w  w.ja  v a  2 s.co m
Copyright (c) 2012 Jerome Wagener

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/

package com.jeromewagener.soutils;

/** Various Soutils parameters (E.g. default buffer sizes...) */
public final class Parameters {
  /** ------------------------------------------------------------------ 
   * Communication parameters to be used by all framework communications 
   * ------------------------------------------------------------------  */

  /** The default buffer size to be used in bytes */
  public static final int COMMUNICATION_BUFFER_SIZE_IN_BYTES = 4096;
  
  /** The default time in milliseconds between trying to read newly received messages from the buffer */
  public static final int COMMUNICATION_DURATION_BETWEEN_READ_ATTEMPTS_IN_MS = 500;
  
  /** The default time between TCP connection accepts for communication servers */
  public static final int COMMUNICATION_MILLISECONDS_UNTIL_NEXT_CONNECTION_ACCEPT = 500;
  
  /** A splitter string which allows to split received multi message strings into SoutilsMessages.
   * E.g. Using the default message splitter ({@code<soutils>}), the following string: 
   * <pre>{@code<soutils>my message 1</soutils><soutils>my message 2</soutils>}</pre> 
   * would be split into two SoutilsMessages having as content
   * <pre>{@code<soutils>my message 1</soutils>}</pre> 
   * and 
   * <pre>{@code<soutils>my message 2</soutils>}</pre> */
  public static String messageSplitter = "<soutils>";
  
  /** ------------------------------------------------------------------ 
   * Default parameter constants for beaconing to be used by all framework beacon implementations 
   * ------------------------------------------------------------------  */

  /** The time in milliseconds until the datagram socket times out. After it times out, a new cycle is started */
  public final static int BEACON_MILLISECONDS_UNTIL_DATAGRAM_SOCKET_TIMEOUT = 500;
  
  /** The time in milliseconds until the beacon is broadcasted again */
  public final static int BEACON_MILLISECONDS_UNTIL_NEXT_BROADCAST = 500;
  
  /** The size of the buffer used for the datagram socket */
  public final static int BEACON_DATAGRAM_BUFFER_SIZE = 4096;
  
  /** ------------------------------------------------------------------ 
   * File transfer parameters to be used by all framework file transfer implementations
   * ------------------------------------------------------------------  */
  
  /** The default buffer size in bytes for file transfers */
  public static final int FILE_TRANSFER_BUFFER_SIZE_IN_BYTES = 8192;
}




Java Source Code List

com.jeromewagener.soutils.Parameters.java
com.jeromewagener.soutils.android.demo.ActivityHelpers.java
com.jeromewagener.soutils.android.demo.DemoActivity.java
com.jeromewagener.soutils.beaconing.BeaconReceiver.java
com.jeromewagener.soutils.beaconing.BeaconSenderAndReceiver.java
com.jeromewagener.soutils.beaconing.BeaconSender.java
com.jeromewagener.soutils.beaconing.package-info.java
com.jeromewagener.soutils.communication.CommunicationException.java
com.jeromewagener.soutils.communication.CommunicationManager.java
com.jeromewagener.soutils.communication.Communication.java
com.jeromewagener.soutils.communication.package-info.java
com.jeromewagener.soutils.demo.desktop.DemoApp.java
com.jeromewagener.soutils.demo.desktop.DemoHelper.java
com.jeromewagener.soutils.filetransfer.FileTransferClient.java
com.jeromewagener.soutils.filetransfer.FileTransferServer.java
com.jeromewagener.soutils.filetransfer.package-info.java
com.jeromewagener.soutils.messaging.MessageType.java
com.jeromewagener.soutils.messaging.SoutilsMessage.java
com.jeromewagener.soutils.messaging.SoutilsObservable.java
com.jeromewagener.soutils.messaging.SoutilsObserver.java
com.jeromewagener.soutils.messaging.package-info.java
com.jeromewagener.soutils.utilities.InetAddressUtilities.java
com.jeromewagener.soutils.utilities.Soutilities.java
com.jeromewagener.soutils.utilities.package-info.java
com.jeromewagener.soutils.package-info.java