Skip to content

Commit 43c24f1

Browse files
author
zhourenjian@gmail.com
committed
Support enum, list, set, queue and map in SimpleSerializable
1 parent 48e6138 commit 43c24f1

4 files changed

Lines changed: 793 additions & 17 deletions

File tree

sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax/SimplePipeHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ public static SimplePipeRunnable getPipe(String key) {
172172

173173
// Use this method to avoid HTTP repeat attacks
174174
@J2SIgnore
175-
public static boolean isPipeHashOK(String key, long hash) {
175+
public static SimplePipeRunnable checkPipeWithHash(String key, long hash) {
176176
SimplePipeRunnable p = getPipe(key);
177177
if (p == null) {
178-
return false;
178+
return null;
179179
}
180180
if (p.lastHash >= hash) {
181-
return false;
181+
return null;
182182
}
183183
p.lastHash = hash;
184-
return true;
184+
return p;
185185
}
186186

187187
// @J2SIgnore
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2013 java2script.org and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Zhou Renjian / zhourenjian@gmail.com - initial API and implementation
10+
*******************************************************************************/
11+
12+
package net.sf.j2s.ajax;
13+
14+
public interface ISimpleEnum {
15+
16+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2013 java2script.org and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Zhou Renjian / zhourenjian@gmail.com - initial API and implementation
10+
*******************************************************************************/
11+
12+
package net.sf.j2s.ajax;
13+
14+
public interface ISimpleRequestBinding extends ISimpleRequestInfoBinding {
15+
16+
public void setRequestPort(int port);
17+
public void setRequestSecurity(boolean sslEnabled);
18+
19+
}

0 commit comments

Comments
 (0)