net.sourceforge.atunes.kernel.handlers
Class MultipleInstancesHandler

java.lang.Object
  extended by net.sourceforge.atunes.kernel.handlers.MultipleInstancesHandler
All Implemented Interfaces:
ApplicationFinishListener

public class MultipleInstancesHandler
extends java.lang.Object
implements ApplicationFinishListener

The Class MultipleInstancesHandler.


Method Summary
 void applicationFinish()
          Called when aTunes finishes.
static MultipleInstancesHandler getInstance()
          Gets the single instance of MultipleInstancesHandler.
static boolean isFirstInstance()
          Tries to open a server socket to listen to other aTunes instances.
static void sendArgumentsToFirstInstance(java.util.List<java.lang.String> args)
          Opens a client socket and sends arguments to "master".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MultipleInstancesHandler getInstance()
Gets the single instance of MultipleInstancesHandler.

Returns:
single instance of MultipleInstancesHandler

applicationFinish

public void applicationFinish()
Called when aTunes finishes.

Specified by:
applicationFinish in interface ApplicationFinishListener

isFirstInstance

public static boolean isFirstInstance()
Tries to open a server socket to listen to other aTunes instances.

Returns:
true if server socket could be opened

sendArgumentsToFirstInstance

public static void sendArgumentsToFirstInstance(java.util.List<java.lang.String> args)
Opens a client socket and sends arguments to "master".

Parameters:
args - the args


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.