de.avetana.bluetooth.sdp
Class ServiceFoundException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byde.avetana.bluetooth.sdp.ServiceFoundException
All Implemented Interfaces:
java.io.Serializable

public class ServiceFoundException
extends java.lang.Exception

A special Exception used by the DiscoveryListener.

COPYRIGHT:
(c) Copyright 2004 Avetana GmbH ALL RIGHTS RESERVED.

This file is part of the Avetana bluetooth API for Linux.

The Avetana bluetooth API for Linux is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The Avetana bluetooth API is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The development of the Avetana bluetooth API is based on the work of Christian Lorenz (see the Javabluetooth Stack at http://www.javabluetooth.org) for some classes, on the work of the jbluez team (see http://jbluez.sourceforge.net/) and on the work of the bluez team (see the BlueZ linux Stack at http://www.bluez.org) for the C code. Classes, part of classes, C functions or part of C functions programmed by these teams and/or persons are explicitly mentioned.



Description:
The Exception thrown if more than one service is discovered. See therefore the method javax.bluetooth.DiscoveryAgent.selectService(...)

See Also:
Serialized Form

Constructor Summary
ServiceFoundException(int serv)
          Creates a new ServiceFound exception
ServiceFoundException(java.lang.String s, int serv)
          Creates a new ServiceFound exception
 
Method Summary
 int getNumberofServicesFound()
          Returns the number of services found.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceFoundException

public ServiceFoundException(int serv)
Creates a new ServiceFound exception

Parameters:
serv - The number of services found

ServiceFoundException

public ServiceFoundException(java.lang.String s,
                             int serv)
Creates a new ServiceFound exception

Parameters:
s - The exception message
serv - The number of services found
Method Detail

getNumberofServicesFound

public int getNumberofServicesFound()
Returns the number of services found.

Returns:
The number of services found.