/** * Copyright 2006 Aldrin Leal, aldrin at leal dot eng dot bee ar * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.codehaus.plexus.discovery.mdns; import java.io.IOException; import java.net.InetAddress; import javax.jmdns.JmDNS; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; /** * Wrapper for JmDNS, required for either MDNSResourceDiscoverer and * JMDNSResourcePublisher * * @author Aldrin Leal * @plexus.component role="org.codehaus.plexus.discovery.mdns.JmDNSWrapper" role-hint="default" * lifecycle-handler="basic" * instantiation-strategy="singleton" */ public class JmDNSWrapper implements Startable { /** JmDNS Instance */ private JmDNS jmdns; /** InetAddress */ private InetAddress inetAddress; /** Flags whether are we running (i.e., alive) or not */ private boolean running;