org.cybergarage.upnp
Class ControlPoint

java.lang.Object
  extended by org.cybergarage.upnp.ControlPoint
All Implemented Interfaces:
HTTPRequestListener
Direct Known Subclasses:
UPnP

public class ControlPoint
extends java.lang.Object
implements HTTPRequestListener


Field Summary
(package private)  ListenerList deviceChangeListenerList
           
 
Constructor Summary
ControlPoint()
           
ControlPoint(int ssdpPort, int httpPort)
           
 
Method Summary
 void addDeviceChangeListener(DeviceChangeListener listener)
           
 void addEventListener(EventListener listener)
           
 void addNotifyListener(NotifyListener listener)
           
 void addSearchResponseListener(SearchResponseListener listener)
           
 void finalize()
           
 Device getDevice(java.lang.String name)
           
 Disposer getDeviceDisposer()
           
 DeviceList getDeviceList()
           
 java.lang.String getEventSubURI()
           
 long getExpiredDeviceMonitoringInterval()
           
 int getHTTPPort()
           
 RenewSubscriber getRenewSubscriber()
           
 int getSearchMx()
           
 int getSSDPPort()
           
 Service getSubscriberService(java.lang.String uuid)
           
 boolean hasDevice(java.lang.String name)
           
 void httpRequestRecieved(HTTPRequest httpReq)
           
 boolean isNMPRMode()
           
 boolean isSubscribed(Service service)
           
 void lock()
           
 void notifyReceived(SSDPPacket packet)
           
 void performAddDeviceListener(Device dev)
           
 void performEventListener(java.lang.String uuid, long seq, java.lang.String name, java.lang.String value)
           
 void performNotifyListener(SSDPPacket ssdpPacket)
           
 void performRemoveDeviceListener(Device dev)
           
 void performSearchResponseListener(SSDPPacket ssdpPacket)
           
 void print()
           
 void removeDeviceChangeListener(DeviceChangeListener listener)
           
 void removeEventListener(EventListener listener)
           
 void removeExpiredDevices()
           
 void removeNotifyListener(NotifyListener listener)
           
 void removeSearchResponseListener(SearchResponseListener listener)
           
 void renewSubscriberService()
           
 void renewSubscriberService(Device dev, long timeout)
           
 void renewSubscriberService(long timeout)
           
 void search()
           
 void search(java.lang.String target)
           
 void search(java.lang.String target, int mx)
           
 void searchResponseReceived(SSDPPacket packet)
           
 void setDeviceDisposer(Disposer disposer)
           
 void setEventSubURI(java.lang.String url)
           
 void setExpiredDeviceMonitoringInterval(long interval)
           
 void setHTTPPort(int port)
           
 void setNMPRMode(boolean flag)
           
 void setRenewSubscriber(RenewSubscriber sub)
           
 void setSearchMx(int mx)
           
 void setSSDPPort(int port)
           
 boolean start()
           
 boolean start(java.lang.String target)
           
 boolean start(java.lang.String target, int mx)
           
 boolean stop()
           
 boolean subscribe(Service service)
           
 boolean subscribe(Service service, long timeout)
           
 boolean subscribe(Service service, java.lang.String uuid)
           
 boolean subscribe(Service service, java.lang.String uuid, long timeout)
           
 void unlock()
           
 void unsubscribe()
           
 void unsubscribe(Device device)
           
 boolean unsubscribe(Service service)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deviceChangeListenerList

ListenerList deviceChangeListenerList
Constructor Detail

ControlPoint

public ControlPoint(int ssdpPort,
                    int httpPort)

ControlPoint

public ControlPoint()
Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

lock

public void lock()

unlock

public void unlock()

getSSDPPort

public int getSSDPPort()

setSSDPPort

public void setSSDPPort(int port)

getHTTPPort

public int getHTTPPort()

setHTTPPort

public void setHTTPPort(int port)

setNMPRMode

public void setNMPRMode(boolean flag)

isNMPRMode

public boolean isNMPRMode()

getDeviceList

public DeviceList getDeviceList()

getDevice

public Device getDevice(java.lang.String name)

hasDevice

public boolean hasDevice(java.lang.String name)

removeExpiredDevices

public void removeExpiredDevices()

setExpiredDeviceMonitoringInterval

public void setExpiredDeviceMonitoringInterval(long interval)

getExpiredDeviceMonitoringInterval

public long getExpiredDeviceMonitoringInterval()

setDeviceDisposer

public void setDeviceDisposer(Disposer disposer)

getDeviceDisposer

public Disposer getDeviceDisposer()

addNotifyListener

public void addNotifyListener(NotifyListener listener)

removeNotifyListener

public void removeNotifyListener(NotifyListener listener)

performNotifyListener

public void performNotifyListener(SSDPPacket ssdpPacket)

addSearchResponseListener

public void addSearchResponseListener(SearchResponseListener listener)

removeSearchResponseListener

public void removeSearchResponseListener(SearchResponseListener listener)

performSearchResponseListener

public void performSearchResponseListener(SSDPPacket ssdpPacket)

addDeviceChangeListener

public void addDeviceChangeListener(DeviceChangeListener listener)

removeDeviceChangeListener

public void removeDeviceChangeListener(DeviceChangeListener listener)

performAddDeviceListener

public void performAddDeviceListener(Device dev)

performRemoveDeviceListener

public void performRemoveDeviceListener(Device dev)

notifyReceived

public void notifyReceived(SSDPPacket packet)

searchResponseReceived

public void searchResponseReceived(SSDPPacket packet)

getSearchMx

public int getSearchMx()

setSearchMx

public void setSearchMx(int mx)

search

public void search(java.lang.String target,
                   int mx)

search

public void search(java.lang.String target)

search

public void search()

httpRequestRecieved

public void httpRequestRecieved(HTTPRequest httpReq)
Specified by:
httpRequestRecieved in interface HTTPRequestListener

addEventListener

public void addEventListener(EventListener listener)

removeEventListener

public void removeEventListener(EventListener listener)

performEventListener

public void performEventListener(java.lang.String uuid,
                                 long seq,
                                 java.lang.String name,
                                 java.lang.String value)

getEventSubURI

public java.lang.String getEventSubURI()

setEventSubURI

public void setEventSubURI(java.lang.String url)

subscribe

public boolean subscribe(Service service,
                         long timeout)

subscribe

public boolean subscribe(Service service)

subscribe

public boolean subscribe(Service service,
                         java.lang.String uuid,
                         long timeout)

subscribe

public boolean subscribe(Service service,
                         java.lang.String uuid)

isSubscribed

public boolean isSubscribed(Service service)

unsubscribe

public boolean unsubscribe(Service service)

unsubscribe

public void unsubscribe(Device device)

unsubscribe

public void unsubscribe()

getSubscriberService

public Service getSubscriberService(java.lang.String uuid)

renewSubscriberService

public void renewSubscriberService(Device dev,
                                   long timeout)

renewSubscriberService

public void renewSubscriberService(long timeout)

renewSubscriberService

public void renewSubscriberService()

setRenewSubscriber

public void setRenewSubscriber(RenewSubscriber sub)

getRenewSubscriber

public RenewSubscriber getRenewSubscriber()

start

public boolean start(java.lang.String target,
                     int mx)

start

public boolean start(java.lang.String target)

start

public boolean start()

stop

public boolean stop()

print

public void print()