Use the class ZkAwareFederationAuthenticator
in your META-INF/context.xml
as described in https://cxf.apache.org/fediz-tomcat.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Book { | |
private Set<Category> categories = new LinkedHashSet<Category>(); | |
private String author; | |
private String name; | |
public Book() {} | |
public void setCategories(Set<Category> categories) { | |
this.categories = categories; | |
} | |
public Set<Category> getCategories() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.TimeUnit; | |
import okio.ByteString; | |
public class TestOKHttp { | |
private static OkHttpClient client; | |
private static WebSocket ws; | |
private static boolean success = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8-jdk | |
MAINTAINER Jumper Chen <jumperchen@potix.com> | |
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 | |
# Config to get to install git, maven, and tomcat7 | |
RUN apt-get update && apt-get install -y --force-yes git maven tomcat7 | |
VOLUME /zksandbox | |
# copy your zksandbox (depends on where the Dockerfile located) folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Todo { | |
private String message; | |
private boolean done; | |
public Todo() {} | |
public Todo(String message) { | |
this.message = message; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script><![CDATA[ | |
zk.afterMount(function () { | |
zk.Desktop._dt.firstChild.appendChild(new GlobalResizeMonitor()); | |
}); | |
GlobalResizeMonitor = zk.$extends(zk.Widget, { | |
bind_: function () { | |
this.$supers('bind_', arguments); | |
zWatch.listen({onSize: this}); | |
}, | |
unbind_: function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Tags(tags = "Example") | |
class ExampleTest extends ZTL4ScalaTestCase { | |
def testClick() = { | |
val zscript = { | |
<vbox> | |
Click "hello world", if you see the message change, it is ok. | |
<zscript><![CDATA[ | |
public void doCreate(Event evt) { | |
evt.target.setValue(" hello,\\n world"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestComposer extends GenericForwardComposer { | |
public void doAfterCompose(Component comp) throws Exception { | |
super.doAfterCompose(comp); | |
System.out.println("Init"); | |
} | |
protected void finalize() throws Throwable { | |
super.finalize(); | |
System.out.println("Finalize"); | |
} |
NewerOlder