001 /*
002 * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.osgi.service.device;
017
018 import org.osgi.framework.ServiceReference;
019
020 /**
021 * Instances of <code>Match</code> are used in the {@link DriverSelector#select}
022 * method to identify Driver services matching a Device service.
023 *
024 * @version $Revision: 5654 $
025 * @since 1.1
026 * @see DriverSelector
027 * @ThreadSafe
028 */
029 public interface Match {
030 /**
031 * Return the reference to a Driver service.
032 *
033 * @return <code>ServiceReference</code> object to a Driver service.
034 */
035 public ServiceReference getDriver();
036
037 /**
038 * Return the match value of this object.
039 *
040 * @return the match value returned by this Driver service.
041 */
042 public int getMatchValue();
043 }