com.intel.bluetooth.emu
Class EmulatorConfiguration

java.lang.Object
  extended by com.intel.bluetooth.emu.EmulatorConfiguration
All Implemented Interfaces:
java.io.Serializable

public class EmulatorConfiguration
extends java.lang.Object
implements java.io.Serializable

Defines Emulator configuration properties. See properties defined in javax.bluetooth.LocalDevice.getProperty();

See Also:
Serialized Form

Field Summary
static java.lang.String CONFIG_FILE_NAME
          Name of configuration file or resource.
protected  int connectionBufferSize
          Defaults to 8K.
static java.lang.String deviceClass
          Allow to define device class.
protected  boolean deviceDiscoverable
          Created Devices are initially discoverable.
protected  int deviceInquiryDuration
          deviceInquiryDuration in seconds, Defaults to 11.
protected  boolean deviceInquiryRandomDelay
          Device Inquiry Duration is random.
static java.lang.String deviceName
          Allow to define device name.
protected  java.lang.String deviceNamePrefix
          Defaults to "EmuDevice".
protected  int durationLIAC
          Discoverable duration in seconds for LIAC.
protected  long firstDeviceAddress
          Defaults to '0B1000000000'.
protected  int keepAliveSeconds
          Monitor if client device is active.
protected  boolean linkEncryptionSupported
          Defaults to true.
protected  boolean senderFlushBlock
          stream.flush() will Block sender till client reads all data.
 
Constructor Summary
EmulatorConfiguration()
           
 
Method Summary
 EmulatorConfiguration clone(long localAddress)
           
 int getConnectionBufferSize()
           
 int getDeviceInquiryDuration()
           
 java.lang.String getDeviceNamePrefix()
           
 int getDurationLIAC()
           
 long getFirstDeviceAddress()
           
 int getIntProperty(java.lang.String property)
           
 int getKeepAliveSeconds()
           
 java.lang.String getProperty(long address, java.lang.String property)
          Get specific device property.
 java.lang.String getProperty(java.lang.String property)
           
 boolean isDeviceDiscoverable()
           
 boolean isDeviceInquiryRandomDelay()
           
 boolean isLinkEncryptionSupported()
           
 boolean isSenderFlushBlock()
           
 void loadConfigFile()
           
static int valueToInt(java.lang.String value)
           
static long valueToLong(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE_NAME

public static final java.lang.String CONFIG_FILE_NAME
Name of configuration file or resource. Defaults to "bluecove.emulator.properties". Can be changed using system property "bluecove.emulator.properties"

See Also:
Constant Field Values

deviceName

public static final java.lang.String deviceName
Allow to define device name.
Example
 0B1000000000.deviceName=My Device Server
 # Device is Computer
 0B1000000000.deviceClass=0x0100
 
 0B1000000001.deviceName=My Device Client
 # Device is Phone
 0B1000000001.deviceClass=0x0200
 
 

See Also:
Constant Field Values

deviceClass

public static final java.lang.String deviceClass
Allow to define device class.

See Also:
deviceName, Constant Field Values

firstDeviceAddress

protected long firstDeviceAddress
Defaults to '0B1000000000'.


deviceNamePrefix

protected java.lang.String deviceNamePrefix
Defaults to "EmuDevice".


deviceDiscoverable

protected boolean deviceDiscoverable
Created Devices are initially discoverable.


durationLIAC

protected int durationLIAC
Discoverable duration in seconds for LIAC. Defaults to 3.


deviceInquiryDuration

protected int deviceInquiryDuration
deviceInquiryDuration in seconds, Defaults to 11.


deviceInquiryRandomDelay

protected boolean deviceInquiryRandomDelay
Device Inquiry Duration is random. Defaults to false.


connectionBufferSize

protected int connectionBufferSize
Defaults to 8K.


linkEncryptionSupported

protected boolean linkEncryptionSupported
Defaults to true.


senderFlushBlock

protected boolean senderFlushBlock
stream.flush() will Block sender till client reads all data.


keepAliveSeconds

protected int keepAliveSeconds
Monitor if client device is active. RMI timeout is up to 10 minutes. This property enables killing application and recovery faster.

Constructor Detail

EmulatorConfiguration

public EmulatorConfiguration()
Method Detail

loadConfigFile

public void loadConfigFile()

valueToInt

public static int valueToInt(java.lang.String value)

valueToLong

public static long valueToLong(java.lang.String value)

clone

public EmulatorConfiguration clone(long localAddress)

getDurationLIAC

public int getDurationLIAC()

getDeviceInquiryDuration

public int getDeviceInquiryDuration()

isDeviceInquiryRandomDelay

public boolean isDeviceInquiryRandomDelay()

getFirstDeviceAddress

public long getFirstDeviceAddress()

getProperty

public java.lang.String getProperty(long address,
                                    java.lang.String property)
Get specific device property. If specific not found, return global value.

Parameters:
address - device address
property -
Returns:
value or null

getProperty

public java.lang.String getProperty(java.lang.String property)

getIntProperty

public int getIntProperty(java.lang.String property)

getDeviceNamePrefix

public java.lang.String getDeviceNamePrefix()

isDeviceDiscoverable

public boolean isDeviceDiscoverable()

getConnectionBufferSize

public int getConnectionBufferSize()

isLinkEncryptionSupported

public boolean isLinkEncryptionSupported()

getKeepAliveSeconds

public int getKeepAliveSeconds()

isSenderFlushBlock

public boolean isSenderFlushBlock()


Copyright © 2004-2008 BlueCove Team. All Rights Reserved.