RCInterfaceManager

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.net.rc
Class RCInterfaceManager

    java.lang.Object
      org.dvb.net.rc.RCInterfaceManager

All Implemented Interfaces:
  ResourceServer

    public class RCInterfaceManager

extends Object
implements ResourceServer

This class is the factory and manager for all return channel interfaces in the system. The methods on this class which return instances of the `RCInterface` will only return new instances of that class under the following conditions:

- on the first occasion an instance needs to be returned to a particular application for a particular interface.
- when new return channel interfaces are added to the system

Method Summary
`void` | `addResourceStatusEventListener(ResourceStatusListener listener)` This method informs a resource server that a particular object should be informed of changes in the state of the resources managed by that server.
`static RCInterfaceManager` | `getInstance()` Factory method to obtain a manager.
`RCInterface` | `getInterface(InetAddress addr)` Return the interface which will be used when connecting to a particular host.
`RCInterface` | `getInterface(Socket s)` Return the interface which is used for a particular socket.
`RCInterface` | `getInterface(URLConnection u)` Return the interface which is used for a particular URLConnection
`RCInterface[]` | `getInterfaces()` Factory method to return a list of all return channel interfaces visible to this application.
`void` | `removeResourceStatusEventListener(ResourceStatusListener listener)` This method informs a resource server that a particular object is no longer interested in being informed about changes in state of resources managed by that server.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static RCInterfaceManager getInstance()

  Factory method to obtain a manager. The RCInterfaceManager is either a singleton for each MHP application or a singleton for the MHP terminal.

  Returns:
    an instance of an RCInterfaceManager

### getInterfaces

    public RCInterface[] getInterfaces()

  Factory method to return a list of all return channel interfaces visible to this application. The number of entries in the array will exactly match the number of return channel interfaces visible to the application. Null is returned if no interfaces are visible to this application.

  Returns:
    an array of available return channel interfaces

### getInterface

    public RCInterface getInterface(InetAddress addr)

  Return the interface which will be used when connecting to a particular host. Null is returned if this is not known when the method is called.

  Parameters:
    `addr` - the IP address of the host to connect to
  Returns:
    the interface which will be used or null if this is not known

### getInterface

    public RCInterface getInterface(Socket s)

  Return the interface which is used for a particular socket.

  Parameters:
    `s` - the socket to use
  Returns:
    the interface which is used or null if the socket is not connected

### getInterface

    public RCInterface getInterface(URLConnection u)

  Return the interface which is used for a particular URLConnection

  Parameters:
    `u` - the URLConnection to use
  Returns:
    the interface which is used or null if the URLConnection is not connected

### addResourceStatusEventListener

    public void addResourceStatusEventListener(ResourceStatusListener listener)

  This method informs a resource server that a particular object should be informed of changes in the state of the resources managed by that server.

  Specified by:
    `addResourceStatusEventListener` in interface `ResourceServer`
  Parameters:
    `listener` - the object to be informed of state changes

### removeResourceStatusEventListener

    public void removeResourceStatusEventListener(ResourceStatusListener listener)

  This method informs a resource server that a particular object is no longer interested in being informed about changes in state of resources managed by that server. If the object had not registered its interest initially then this method has no effect.

  Specified by:
    `removeResourceStatusEventListener` in interface `ResourceServer`
  Parameters:
    `listener` - the object which is no longer interested

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD