com.mucommander.bonjour
Class BonjourService

java.lang.Object
  extended by com.mucommander.bonjour.BonjourService

public class BonjourService
extends java.lang.Object

A simple container for a Bonjour service described by a name and URL.

Author:
Maxence Bernard

Constructor Summary
BonjourService(java.lang.String name, FileURL url, java.lang.String fullyQualifiedName)
          Creates a new BonjourService instance using the given name and URL.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the given Object is a BonjourService instance with the same fully qualified name.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name of this service, e.g.
 java.lang.String getName()
          Returns the unqualified name of this service, e.g.
 java.lang.String getNameWithProtocol()
          Returns the name appended with the URL's protocol.
 FileURL getURL()
          Returns the location of this service.
 java.lang.String toString()
          Returns a String representation of this BonjourService in the form name / url.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BonjourService

public BonjourService(java.lang.String name,
                      FileURL url,
                      java.lang.String fullyQualifiedName)
Creates a new BonjourService instance using the given name and URL.

Parameters:
name - the unqualified name of the service, e.g. 'foobar'
url - the url pointing to the service's location
fullyQualifiedName - the fully qualified name of the service, e.g. 'foobar._http._tcp.local'
Method Detail

getName

public java.lang.String getName()
Returns the unqualified name of this service, e.g. 'foobar'.

Returns:
the unqualified name of this service

getNameWithProtocol

public java.lang.String getNameWithProtocol()
Returns the name appended with the URL's protocol.

Returns:
the name appended with the URL's protocol.

getURL

public FileURL getURL()
Returns the location of this service.

Returns:
the location of this service.

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
Returns the fully qualified name of this service, e.g. 'foobar._http._tcp.local'

Returns:
the fully qualified name of this service

equals

public boolean equals(java.lang.Object o)
Returns true if the given Object is a BonjourService instance with the same fully qualified name.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of this BonjourService in the form name / url.

Overrides:
toString in class java.lang.Object


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard