org.davic.net.tuning
Class NetworkInterface

java.lang.Object
  extended by org.davic.net.tuning.NetworkInterface

public class NetworkInterface
extends java.lang.Object

Objects of this class represent physical network interfaces that can be used for receiving broadcast transport streams.


Method Summary
 void addNetworkInterfaceListener(NetworkInterfaceListener listener)
          Adds a listener for network interface events
 boolean equals(java.lang.Object other)
          Tests for equality where two NetworkInterface objects are equal if and only if they control the same physical tuner.
 TransportStream getCurrentTransportStream()
          Returns the transport stream to which the network Interface is currently tuned.
 int getDeliverySystemType()
          This method returns the type of the delivery system that this network interface is connected to.
 Locator getLocator()
          Returns the Locator of the transport stream to which the network interface is connected.
 int hashCode()
          Returns a hash code value for the object.
 boolean isLocal()
           
 boolean isReserved()
           
 TransportStream[] listAccessibleTransportStreams()
          Lists the known transport streams that are accessible through this network interface.
 void removeNetworkInterfaceListener(NetworkInterfaceListener listener)
          Removes a registered listener
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentTransportStream

public TransportStream getCurrentTransportStream()
Returns the transport stream to which the network Interface is currently tuned. Returns null if the network interface is not currently tuned to a transport stream, e.g. because it is performing a tune action.

Returns:
Transport stream to which the network interface is currently tuned

getLocator

public Locator getLocator()
Returns the Locator of the transport stream to which the network interface is connected. Returns null if the network interface is not currently tuned to a transport stream.

Returns:
Locator of the transport stream to which the network interface is tuned

isReserved

public boolean isReserved()
Returns:
true, if the network interface is reserved, otherwise false

isLocal

public boolean isLocal()
Returns:
true, if the network interface is local (i.e. embedded in the receiver), otherwise false

listAccessibleTransportStreams

public TransportStream[] listAccessibleTransportStreams()
Lists the known transport streams that are accessible through this network interface. If there are no such streams, returns an array with length of zero.

Returns:
array of transport streams accassible through this network interface

getDeliverySystemType

public int getDeliverySystemType()
This method returns the type of the delivery system that this network interface is connected to.

Returns:
delivery system type

addNetworkInterfaceListener

public void addNetworkInterfaceListener(NetworkInterfaceListener listener)
Adds a listener for network interface events

Parameters:
listener - listener object to be registered to receive network interface events

removeNetworkInterfaceListener

public void removeNetworkInterfaceListener(NetworkInterfaceListener listener)
Removes a registered listener

Parameters:
listener - listener object to be removed so that it will not receive network interface events in future

equals

public boolean equals(java.lang.Object other)
Tests for equality where two NetworkInterface objects are equal if and only if they control the same physical tuner.

Overrides:
equals in class java.lang.Object
Parameters:
other - the reference object with which to compare.
Returns:
true if and only if other is an instance of NetworkInterface and calls to other control the same physical tuner as this.

hashCode

public int hashCode()
Returns a hash code value for the object. which obeys the contract of Object.hashCode().

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for the object.