org.nakedobjects.plugins.xstream.server.XStreamOverSocketsViewerInstaller Maven / Gradle / Ivy
package org.nakedobjects.plugins.xstream.server;
import java.util.List;
import org.nakedobjects.remoting.protocol.encoding.internal.ObjectEncoderDecoder;
import org.nakedobjects.remoting.server.SocketsViewerAbstract;
import org.nakedobjects.remoting.server.SocketsViewerInstallerAbstract;
import org.nakedobjects.runtime.NakedObjects;
import org.nakedobjects.runtime.viewer.NakedObjectsViewer;
/**
* Implementation of a {@link NakedObjectsViewer} providing the ability to run
* from server as a {@link NakedObjects command line} application.
*
*
* To run, use the --viewer xstream-sockets flag. The client-side
* should run using --connector xstream-sockets flag.
*/
public class XStreamOverSocketsViewerInstaller extends SocketsViewerInstallerAbstract {
public XStreamOverSocketsViewerInstaller() {
super("xstream-sockets");
}
@Override
protected void addConfigurationResources(List configurationResources) {
super.addConfigurationResources(configurationResources);
// TODO: this (small) hack is because we don't load up the Protocol (Marshaller)
// and Transport using the installers.
configurationResources.add("protocol_xstream.properties");
configurationResources.add("transport_sockets.properties");
}
@Override
protected SocketsViewerAbstract createSocketsViewer(ObjectEncoderDecoder objectEncoderDecoder) {
return new XStreamOverSocketsViewer(objectEncoderDecoder);
}
}
// Copyright (c) Naked Objects Group Ltd.