TM Service Discovery
Release 2.0

org.eclipse.tm.discovery.protocol
Class ProtocolFactory

java.lang.Object
  extended by org.eclipse.tm.discovery.protocol.ProtocolFactory

public class ProtocolFactory
extends Object

Static factory to handle the protocol implementations.


Constructor Summary
ProtocolFactory()
           
 
Method Summary
static String getMulticastAddress(String protocolName, String transportName)
          Gets the multicast address given a protocol name and a transport name or returns null if this information is not available
static IProtocol getProtocol(String protocolName)
          Gets the IProtocol implementation of a protocol given its name
static String[] getProtocolList()
          Returns the available protocol names.
static String[] getQueryList(String protocolName)
          Returns the recommended queries for the specified protocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolFactory

public ProtocolFactory()
Method Detail

getProtocolList

public static String[] getProtocolList()
Returns the available protocol names. This protocol names are registered in the field name of the extension point discoveryProtocol

Returns:
Array of available protocol names

getQueryList

public static String[] getQueryList(String protocolName)
                             throws CoreException
Returns the recommended queries for the specified protocol

Parameters:
protocolName - Name of the protocol
Returns:
Array of recommended queries to be send using this protocol.
Throws:
CoreException

getProtocol

public static IProtocol getProtocol(String protocolName)
                             throws CoreException
Gets the IProtocol implementation of a protocol given its name

Parameters:
protocolName - Name of the protocol
Returns:
IProtocol implementation of the protocol matching the given name. Null if the protocol cannot be found.
Throws:
CoreException
See Also:
IProtocol

getMulticastAddress

public static String getMulticastAddress(String protocolName,
                                         String transportName)
                                  throws CoreException
Gets the multicast address given a protocol name and a transport name or returns null if this information is not available

Parameters:
protocolName - Name of the protocol
transportName - Name of the transport
Returns:
String representing the multicast address of the given protocol and transport or null if not available
Throws:
CoreException
See Also:
IProtocol

TM Service Discovery
Release 2.0

Copyright (c) 2007 Symbian Software Ltd. and others. All Rights Reserved.