TrackerWCHelperpublic abstract class TrackerWCHelper extends Object implements org.gudy.azureus2.plugins.tracker.web.TrackerWebContext, org.gudy.azureus2.core3.tracker.host.TRHostAuthenticationListener, org.gudy.azureus2.core3.tracker.server.TRTrackerServerAuthenticationListener
Fields Summary |
---|
private org.gudy.azureus2.plugins.PluginInterface | plugin_interface | private org.gudy.azureus2.plugins.tracker.Tracker | tracker | private List | generators | protected org.gudy.azureus2.core3.util.AEMonitor | this_mon |
Constructors Summary |
---|
protected TrackerWCHelper()
plugin_interface = UtilitiesImpl.getPluginThreadContext();
|
Methods Summary |
---|
public void | addPageGenerator(org.gudy.azureus2.plugins.tracker.web.TrackerWebPageGenerator generator)
try{
this_mon.enter();
generators.add( generator );
}finally{
this_mon.exit();
}
| public void | destroy()
generators.clear();
| public org.gudy.azureus2.plugins.tracker.web.TrackerWebPageGenerator[] | getPageGenerators()
TrackerWebPageGenerator[] res = new TrackerWebPageGenerator[generators.size()];
generators.toArray( res );
return( res );
| public boolean | handleExternalRequest(java.net.InetSocketAddress _client_address, java.lang.String _user, java.lang.String _url, java.net.URL _absolute_url, java.lang.String _header, java.io.InputStream _is, java.io.OutputStream _os)
UtilitiesImpl.setPluginThreadContext( plugin_interface );
TrackerWebPageRequestImpl request = new TrackerWebPageRequestImpl( tracker, this, _client_address, _user, _url, _absolute_url, _header, _is );
TrackerWebPageResponseImpl reply = new TrackerWebPageResponseImpl( _os , request);
for (int i=0;i<generators.size();i++){
TrackerWebPageGenerator generator;
try{
this_mon.enter();
if ( i >= generators.size()){
break;
}
generator = (TrackerWebPageGenerator)generators.get(i);
}finally{
this_mon.exit();
}
if ( generator.generate( request, reply )){
reply.complete();
return( true );
}
}
return( false );
| public void | removePageGenerator(org.gudy.azureus2.plugins.tracker.web.TrackerWebPageGenerator generator)
try{
this_mon.enter();
generators.remove( generator );
}finally{
this_mon.exit();
}
| protected void | setTracker(org.gudy.azureus2.plugins.tracker.Tracker _tracker)
tracker = _tracker;
|
|