Package org.gudy.azureus2.platform

Examples of org.gudy.azureus2.platform.PlatformManager


     * @param data user-defined data object;
     *         see the platform-specific <code>PlatformManager</code> for what may be supported
     */
    public static void requestUserAttention(int type, Object data) {

      PlatformManager pm = PlatformManagerFactory.getPlatformManager();
      if (true == pm.hasCapability(PlatformManagerCapabilities.RequestUserAttention)) {
        try {
          pm.requestUserAttention(type, data);
        } catch (PlatformManagerException e) {
          Debug.printStackTrace(e);
        }
      }
    }
View Full Code Here


    plugin_interface.getPluginProperties().setProperty("plugin.name",
        "Platform-Specific Support");

    String version = "1.0"; // default version if plugin not present

    PlatformManager platform = PlatformManagerFactory.getPlatformManager();

    if (platform.hasCapability(PlatformManagerCapabilities.GetVersion)) {

      try {
        version = platform.getVersion();

      } catch (Throwable e) {

        Debug.printStackTrace(e);
      }
View Full Code Here

    throws PluginException
  {
      try{
          // we need to spawn without inheriting handles
       
        PlatformManager pm = PlatformManagerFactory.getPlatformManager();
       
        pm.createProcess( command_line, false );
             
      }catch(Throwable e) {
       
          Debug.printStackTrace(e);
         
View Full Code Here

                FileUtil.deleteWithRecycle( target, force_no_recycle );

            }else{

                PlatformManager mgr = PlatformManagerFactory.getPlatformManager();
                if( Constants.isOSX &&
                      torrent_save_file.length() > 0 &&
                      COConfigurationManager.getBooleanParameter("Move Deleted Data To Recycle Bin" ) &&
                    (! force_no_recycle ) &&
                      mgr.hasCapability(PlatformManagerCapabilities.RecoverableFileDelete) ) {

                    try
                    {
                        String  dir = torrent_save_dir + File.separatorChar + torrent_save_file + File.separatorChar;

                            // only delete the dir if there's only this torrent's files in it!

                        if ( countFiles( new File(dir)) == countDataFiles( torrent, torrent_save_dir, torrent_save_file )){

                            mgr.performRecoverableFileDelete( dir );

                        }else{

                            deleteDataFileContents( torrent, torrent_save_dir, torrent_save_file, force_no_recycle );
                    }
View Full Code Here

    String    exec )
  {
      try{
          // we need to spawn without inheriting handles
       
        PlatformManager pm = PlatformManagerFactory.getPlatformManager();
       
        pm.createProcess( exec, false );
     
        return( true );
       
      }catch(Throwable e) {
          e.printStackTrace(log);
View Full Code Here

    }
 
  public boolean
  canTraceRoute()
  {
    PlatformManager  pm = PlatformManagerFactory.getPlatformManager();

    return( pm.hasCapability( PlatformManagerCapabilities.TraceRouteAvailability ));
  }
View Full Code Here

    final int            max_millis,
    final NetworkAdminRouteListener  listener )
 
    throws NetworkAdminException
  {
    PlatformManager  pm = PlatformManagerFactory.getPlatformManager();
     
    if ( !canTraceRoute()){
     
      throw( new NetworkAdminException( "No trace-route capability on platform" ));
    }
   
    final List  nodes = new ArrayList();
   
    try{
      pm.traceRoute(
        interface_address,
        target,
        new PlatformManagerPingCallback()
        {
          private long  start_time = SystemTime.getCurrentTime();
View Full Code Here

  }
 
  public boolean
  canPing()
  {
    PlatformManager  pm = PlatformManagerFactory.getPlatformManager();

    return( pm.hasCapability( PlatformManagerCapabilities.PingAvailability ));
  }
View Full Code Here

    final int            max_millis,
    final NetworkAdminRouteListener  listener )
 
    throws NetworkAdminException
  {
    PlatformManager  pm = PlatformManagerFactory.getPlatformManager();
     
    if ( !canPing()){
     
      throw( new NetworkAdminException( "No ping capability on platform" ));
    }
   
    final NetworkAdminNode[] nodes = { null };
   
    try{
      pm.ping(
        interface_address,
        target,
        new PlatformManagerPingCallback()
        {
          private long  start_time = SystemTime.getCurrentTime();
View Full Code Here

  protected static List platformLoginCompleteListeners = Collections.EMPTY_LIST;

  private static CopyOnWriteList<String> externalLinks = new CopyOnWriteList<String>();
 
  public static void login(long contentNetworkID, long maxDelayMS) {
    PlatformManager pm = PlatformManagerFactory.getPlatformManager();
   
    String sourceRef = null;
    if (contentNetworkID != ConstantsVuze.DEFAULT_CONTENT_NETWORK_ID) {
      ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetwork(contentNetworkID);
      sourceRef = (String) cn.getPersistentProperty(ContentNetwork.PP_SOURCE_REF);
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.platform.PlatformManager

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.