Package org.gudy.azureus2.plugins.utils.subscriptions

Examples of org.gudy.azureus2.plugins.utils.subscriptions.Subscription


   *
   * @since 3.0.0.7
   */
  private boolean nextUpdate() {
    if (iterDownloaders.hasNext()) {
      ResourceDownloader downloader = (ResourceDownloader) iterDownloaders.next();
      downloader.addListener(this);
      downloader.asyncDownload();
      return true;
    }
    return false;
  }
View Full Code Here


              }
             
              setProgress( 0 );
             
              downloader.addListener(
                new ResourceDownloaderAdapter()
                {
                  public void
                  reportPercentComplete(
                    ResourceDownloader  downloader,
                    int          percentage )
View Full Code Here

            for ( int i=0;i<subs.length;i++ ){
             
              final PluginSubscription p_sub = p_subs[i];
             
              subs[i] =
                new Subscription()
                {
                  public String
                  getID()
                  {
                    return( p_sub.getID());
View Full Code Here

       
      }else{
       
        String  id = path.substring( 1 );
       
        Subscription  subscription = null;
       
        for ( Subscription s: subs ){
         
          if ( s.getID().equals( id )){
           
            subscription = s;
           
            break;
          }
        }
       
        if ( subscription == null ){
         
          response.setReplyStatus( 404 );
         
          return( true );
        }
       
        URL  feed_url = url;
 
          // absolute url is borked as it doesn't set the host properly. hack
       
        String  host = (String)request.getHeaders().get( "host" );
       
        if ( host != null ){
         
          int  pos = host.indexOf( ':' );
         
          if ( pos != -1 ){
           
            host = host.substring( 0, pos );
          }
         
          feed_url = UrlUtils.setHost( url, host );
        }
       
        response.setContentType( "application/xml" );
       
        pw.println( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" );
       
        pw.println(
            "<rss version=\"2.0\" " +
            "xmlns:vuze=\"http://www.vuze.com\" " +
            "xmlns:media=\"http://search.yahoo.com/mrss/\" " +
            "xmlns:atom=\"http://www.w3.org/2005/Atom\" " +
            "xmlns:itunes=\"http://www.itunes.com/dtds/podcast-1.0.dtd\">" );
       
        pw.println( "<channel>" );
       
        String channel_title = "Vuze Subscription: " + escape( subscription.getName());
           
        pw.println( "<title>" + channel_title + "</title>" );
        pw.println( "<link>http://vuze.com</link>" );
        pw.println( "<atom:link href=\"" + escape( feed_url.toExternalForm()) + "\" rel=\"self\" type=\"application/rss+xml\" />" );
       
        pw.println( "<description>Vuze RSS Feed for subscription " + escape( subscription.getName()) + "</description>" );
       
        pw.println("<itunes:image href=\"http://www.vuze.com/img/vuze_icon_128.png\"/>");
        pw.println("<image><url>http://www.vuze.com/img/vuze_icon_128.png</url><title>" + channel_title + "</title><link>http://vuze.com</link></image>");
       
           
        SubscriptionResult[] results = subscription.getResults();

                     
        String  feed_date_key = "subscriptions.feed_date." + subscription.getID();
       
        long feed_date = COConfigurationManager.getLongParameter( feed_date_key );
 
        boolean new_date = false;
       
View Full Code Here

    props         = new propertyWrapper(_props );
    pluginDir       = _pluginDir;
    config         = new PluginConfigImpl(this,pluginConfigKey);
    given_plugin_id      = _plugin_id;
    plugin_version    = _plugin_version;
    ipc_interface      = new IPCInterfaceImpl( initialiser, plugin );
    state                 = new PluginStateImpl(this, initialiser);
   
    boolean verified   = false;
    boolean bad    = false;
   
View Full Code Here

  }
 
  public IPFilter
  getIPFilter()
  {
    return( new IPFilterImpl());
  }
View Full Code Here

 
  public Logger getLogger()
  {
    if ( logger == null ){
     
      logger = new LoggerImpl( this );
    }
   
    return( logger );
  }
View Full Code Here

    else {
      plug_msg = new MessageAdapter( message )//core created
    }
   
    RawMessage raw_plug = plug_encoder.encodeMessage( plug_msg );
    return new com.aelitis.azureus.core.networkmanager.RawMessage[]{ new RawMessageAdapter( raw_plug )};
  }
View Full Code Here

    return config;
  }


  public PluginConfigUIFactory getPluginConfigUIFactory() {
    return new PluginConfigUIFactoryImpl(config,pluginConfigKey);
  }
View Full Code Here

  {
    boolean  handled = false;
   
    for (int i=0;i<listeners.size();i++){
     
      PooledByteBuffer  buffer = new PooledByteBufferImpl(message.getPayload());
     
      try{
        ((GenericMessageConnectionListener)listeners.get(i)).receive( this, buffer );
       
        handled = true;
       
      }catch( Throwable f ){
       
        buffer.returnToPool();
       
        if ( !( f instanceof MessageException )){
       
          Debug.printStackTrace(f);
        }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.utils.subscriptions.Subscription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.