Author: klystr
(2009/12/04 09:31) About 2 years ago
Get van Q2 done
52
return this.queue.poll();
53
}
54
55
/**
56
* Geeft Array terug van hele queue
57
*
58
* @return Lijst met alle items
59
*/
60
public LinkedList<String> peekEntireQueue() {
61
return new LinkedList<String>(this.queue);
62
63
public void setqName(String qName) {
64
this.qName = qName;
65
66
113
try {
114
outputStream = new ByteArrayOutputStream();
115
this.ftpClient.retrieveFile(filePath, outputStream);
116
this.ftpClient.dele(filePath);
// this.ftpClient.dele(filePath);
117
} catch (IOException e) {
118
e.printStackTrace();
119
3
import hanze.ga.wt3.channels.Q2App;
4
import hanze.ga.wt3.helper.Security;
5
6
import java.io.IOException;
7
import java.net.ServerSocket;
8
public class HTTPQ2AppChannel extends Q2App {
9
10
private Security httpSecurity;
11
12
private ServerSocket serverSocket;
13
public Security getHttpSecurity() {
14
return httpSecurity;
15
16
17
18
private void openConnection() {
19
20
System.out.println("[HTTPQ2AppChannel] Start listening on port "
21
+ this.getChannelPort() + " for Queue: " + this.getSourceQueue().getqName());
22
23
serverSocket = new ServerSocket(this.getChannelPort());
24
while (true) {
25
new Thread(new HTTPGetConnection(serverSocket.accept(), this)).start();
26
27
28
29
30
31
@Override
32
public void run() {
33
34
this.openConnection();
35
36
public void setHttpSecurity(Security httpSecurity) {
37
<adapter>
<direction>Q2APP</direction>
<protocol >HTTP</protocol>
<port>9090</port>
<port>8080</port>
<security>
<enc-type>AES-128</enc-type>
<key>3939A97A7779676969AD39D0E1F3ADFA</key>
public LinkedList<String> peekEntireQueue() {public void setqName(String qName) {public void setqName(String qName) {try {try {// this.ftpClient.dele(filePath);} catch (IOException e) {} catch (IOException e) {public class HTTPQ2AppChannel extends Q2App {public class HTTPQ2AppChannel extends Q2App {public Security getHttpSecurity() {public Security getHttpSecurity() {private void openConnection() {try {System.out.println("[HTTPQ2AppChannel] Start listening on port "while (true) {} catch (IOException e) {public void run() {public void run() {this.openConnection();public void setHttpSecurity(Security httpSecurity) {public void setHttpSecurity(Security httpSecurity) {<port>9090</port><port>8080</port>