com.stollmann.terminalIO
Class TIOAdvertisement

java.lang.Object
  extended by com.stollmann.terminalIO.TIOAdvertisement

public class TIOAdvertisement
extends java.lang.Object

TIOAdvertisement instances represent a remote TerminalIO peripherals's advertisement data. The application retrieves TIOAdvertisement instances as the TIOPeripheral.getAdvertisement() property. The application shall not create any TIOAdvertisement instances of its own.


Method Summary
static TIOAdvertisement createFromScanRecord(java.lang.String localName, byte[] manufacturerSpecificData)
          // * @deprecated (exclude for javadoc documentation generation) Internal method to be called by TIOManager only; do not call from application code.
 boolean equals(TIOAdvertisement advertisement)
          Compares this instance to another TIOAdvertisement instance for equality of contents .
 java.lang.String getDisplayString()
          Gets a string representation of this instance containing local name, operation mode and connection request state.
 java.lang.String getLocalName()
          Gets the peripheral's local name as contained within the peripheral's advertisement data.
 TIO.OperationMode getOperationMode()
          Gets the peripheral's operation mode as contained within the peripheral's advertisement data.
 boolean isConnectionRequested()
          Gets the peripheral's connection requested state as contained within the peripheral's advertisement data.
 java.lang.String toString()
          Gets a tring representation of this instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createFromScanRecord

public static final TIOAdvertisement createFromScanRecord(java.lang.String localName,
                                                          byte[] manufacturerSpecificData)
// * @deprecated (exclude for javadoc documentation generation) Internal method to be called by TIOManager only; do not call from application code.


equals

public boolean equals(TIOAdvertisement advertisement)
Compares this instance to another TIOAdvertisement instance for equality of contents .

Parameters:
advertisement - The TIOAdvertisement instance to compare this instance to.
Returns:
true, if local name, operation mode and connection requested state are equal, false otherwise.

getDisplayString

public java.lang.String getDisplayString()
Gets a string representation of this instance containing local name, operation mode and connection request state.

Returns:
A String instance containing local name, operation mode and connection request state.

getLocalName

public java.lang.String getLocalName()
Gets the peripheral's local name as contained within the peripheral's advertisement data.

Returns:
A String instance containing the local name as contained within the peripheral's advertisement data.

getOperationMode

public TIO.OperationMode getOperationMode()
Gets the peripheral's operation mode as contained within the peripheral's advertisement data.

Returns:
A TIO.OperationMode value extracted from the peripheral's advertisement data.

isConnectionRequested

public boolean isConnectionRequested()
Gets the peripheral's connection requested state as contained within the peripheral's advertisement data.

Returns:
true if the peripheral requests a connection, false otherwise.

toString

public java.lang.String toString()
Gets a tring representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
A String instance representing this instance.