1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005, 2006 Grigor Kirilov Iliev |
* Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
29 |
|
|
30 |
|
|
31 |
/** |
/** |
32 |
* Because of the synchronization of <code>org.linuxsampler.lscp.Client</code> methods |
* This task sets the Linux Sampler address. |
33 |
* setting the server address and port can be time consuming, so it needs to be done safely. |
* This needs to be done out of the event-dispatching thread due to |
34 |
|
* the synchronization of <code>org.linuxsampler.lscp.Client</code> methods |
35 |
|
* (setting the server address and port can be time consuming). |
36 |
* @author Grigor Iliev |
* @author Grigor Iliev |
37 |
*/ |
*/ |
38 |
public class SetServerAddress extends EnhancedTask { |
public class SetServerAddress extends EnhancedTask { |
39 |
private String address; |
private String address; |
40 |
private int port; |
private int port; |
41 |
|
|
42 |
|
/** |
43 |
|
* Creates new instance of <code>SetServerAddress</code>. |
44 |
|
* @param address The Linux Sampler address. |
45 |
|
* If <code>address</code> is <code>null</code>, sets to default address - 127.0.0.1. |
46 |
|
* @param port The Linux Sampler port number. |
47 |
|
*/ |
48 |
public |
public |
49 |
SetServerAddress(String address, int port) { |
SetServerAddress(String address, int port) { |
50 |
setTitle(""); |
setTitle(""); |
53 |
this.port = port; |
this.port = port; |
54 |
} |
} |
55 |
|
|
56 |
|
/** The entry point of the task. */ |
57 |
public void |
public void |
58 |
run() { |
run() { |
59 |
try { |
try { |