Project JXTA

net.jxta.impl.peer
Class PeerInfoServiceInterface

java.lang.Object
  extended by net.jxta.impl.peer.PeerInfoServiceInterface
All Implemented Interfaces:
PeerInfoService, Module, Service

public class PeerInfoServiceInterface
extends Object
implements PeerInfoService

PeerInfoServiceInterface provides a pure interface object that permits interaction with the actual PeerInfoService implementation without giving access to the real object.


Field Summary
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
PeerInfoServiceInterface(PeerInfoService theRealThing)
          Only authorized constructor
 
Method Summary
 long addMonitorListener(MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener)
           
 void addRemoteMonitorListener(PeerID peerID, MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener, long lease, long timeout)
           
 long getBestReportRate(long desiredReportRate)
           
 MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter)
           
 void getCumulativeMonitorReport(PeerID peerID, MonitorFilter monitorFilter, MonitorListener monitorListener, long timeout)
           
 Advertisement getImplAdvertisement()
          
 Service getInterface()
           Since THIS is already such an object, it returns itself.
 PeerMonitorInfo getPeerMonitorInfo()
           
 void getPeerMonitorInfo(PeerID peerID, PeerMonitorInfoListener peerMonitorInfoListener, long timeout)
           
 long[] getSupportedReportRates()
           
 void init(PeerGroup pg, ID assignedID, Advertisement impl)
          

Initialize the application FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement.

 boolean isLocalMonitoringAvailable()
           
 boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID)
           
 boolean isSupportedReportRate(long reportRate)
           
 boolean removeMonitorListener(MonitorListener monitorListener)
           
 void removeRemoteMonitorListener(MonitorListener monitorListener, long timeout)
           
 void removeRemoteMonitorListener(PeerID peerID, MonitorListener monitorListener, long timeout)
           
 int startApp(String[] arg)
          

This is here for temporary class hierarchy reasons. it is ALWAYS ignored.

 void stopApp()
          

This is here for temporary class hierarchy reasons. it is ALWAYS ignored.

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

Constructor Detail

PeerInfoServiceInterface

public PeerInfoServiceInterface(PeerInfoService theRealThing)
Only authorized constructor

Parameters:
theRealThing -
Method Detail

getInterface

public Service getInterface()
Since THIS is already such an object, it returns itself. FIXME: it is kind of absurd to have this method part of the interface but we do not want to define two levels of Service interface just for that.

Specified by:
getInterface in interface Service

getImplAdvertisement

public Advertisement getImplAdvertisement()

Specified by:
getImplAdvertisement in interface Service

init

public void init(PeerGroup pg,
                 ID assignedID,
                 Advertisement impl)

Initialize the application FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement. Ultimately, the API should define two levels of interfaces: one for the real service implementation and one for the interface object. Right now it feels a bit heavy to so that since the only different between the two would be init() and may-be getName().

Specified by:
init in interface Module

startApp

public int startApp(String[] arg)

This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called

Specified by:
startApp in interface Module

stopApp

public void stopApp()

This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called This request is currently ignored.

Specified by:
stopApp in interface Module

isLocalMonitoringAvailable

public boolean isLocalMonitoringAvailable()
Specified by:
isLocalMonitoringAvailable in interface PeerInfoService

isLocalMonitoringAvailable

public boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID)
Specified by:
isLocalMonitoringAvailable in interface PeerInfoService

getSupportedReportRates

public long[] getSupportedReportRates()
Specified by:
getSupportedReportRates in interface PeerInfoService

isSupportedReportRate

public boolean isSupportedReportRate(long reportRate)
Specified by:
isSupportedReportRate in interface PeerInfoService

getBestReportRate

public long getBestReportRate(long desiredReportRate)
Specified by:
getBestReportRate in interface PeerInfoService

getPeerMonitorInfo

public PeerMonitorInfo getPeerMonitorInfo()
Specified by:
getPeerMonitorInfo in interface PeerInfoService

getPeerMonitorInfo

public void getPeerMonitorInfo(PeerID peerID,
                               PeerMonitorInfoListener peerMonitorInfoListener,
                               long timeout)
                        throws MonitorException
Specified by:
getPeerMonitorInfo in interface PeerInfoService
Throws:
MonitorException

getCumulativeMonitorReport

public MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter)
                                         throws MonitorException
Specified by:
getCumulativeMonitorReport in interface PeerInfoService
Throws:
MonitorException

getCumulativeMonitorReport

public void getCumulativeMonitorReport(PeerID peerID,
                                       MonitorFilter monitorFilter,
                                       MonitorListener monitorListener,
                                       long timeout)
                                throws MonitorException
Specified by:
getCumulativeMonitorReport in interface PeerInfoService
Throws:
MonitorException

addMonitorListener

public long addMonitorListener(MonitorFilter monitorFilter,
                               long reportRate,
                               boolean includeCumulative,
                               MonitorListener monitorListener)
                        throws MonitorException
Specified by:
addMonitorListener in interface PeerInfoService
Throws:
MonitorException

addRemoteMonitorListener

public void addRemoteMonitorListener(PeerID peerID,
                                     MonitorFilter monitorFilter,
                                     long reportRate,
                                     boolean includeCumulative,
                                     MonitorListener monitorListener,
                                     long lease,
                                     long timeout)
                              throws MonitorException
Specified by:
addRemoteMonitorListener in interface PeerInfoService
Throws:
MonitorException

removeMonitorListener

public boolean removeMonitorListener(MonitorListener monitorListener)
                              throws MonitorException
Specified by:
removeMonitorListener in interface PeerInfoService
Throws:
MonitorException

removeRemoteMonitorListener

public void removeRemoteMonitorListener(PeerID peerID,
                                        MonitorListener monitorListener,
                                        long timeout)
                                 throws MonitorException
Specified by:
removeRemoteMonitorListener in interface PeerInfoService
Throws:
MonitorException

removeRemoteMonitorListener

public void removeRemoteMonitorListener(MonitorListener monitorListener,
                                        long timeout)
                                 throws MonitorException
Specified by:
removeRemoteMonitorListener in interface PeerInfoService
Throws:
MonitorException

JXTA J2SE