WSTCPpublic final class WSTCP extends Object
Fields Summary |
---|
private static final Logger | logger | private static final String | JAXWS_RI_RUNTIME | private final TCPContext | context | private final ClassLoader | initClassLoader | private WSTCPDelegate | delegate | private WSTCPConnector | connector | private final String | contextPath |
Constructors Summary |
---|
public WSTCP(TCPContext context, ClassLoader initClassLoader, String contextPath)
this.context = context;
this.initClassLoader = initClassLoader;
this.contextPath = contextPath;
|
Methods Summary |
---|
public void | close()
if (connector != null) {
connector.close();
}
| public WSTCPConnector | initialize()
final List<TCPAdapter> adapters = parseDeploymentDescriptor();
delegate = new WSTCPDelegate();
delegate.registerAdapters(contextPath, adapters);
final TCPAdapter adapter = adapters.get(0);
final URI uri = adapter.getEndpoint().getPort().getAddress().getURI();
final WSTCPURI tcpURI = WSTCPURI.parse(uri);
final WSTCPConnector connector = new GrizzlyTCPConnector(tcpURI.host,
tcpURI.port, delegate);
connector.listen();
return connector;
| public static void | main(java.lang.String[] args)
if (args.length != 1) {
System.out.println(MessagesMessages.STANDALONE_RUN());
System.exit(0);
}
final String contextPath = args[0];
final ClassLoader classloader = Thread.currentThread().getContextClassLoader();
final TCPContext context = new TCPStandaloneContext(classloader);
final WSTCP wsTCP = new WSTCP(context, classloader, contextPath);
try {
wsTCP.process();
System.out.println(MessagesMessages.STANDALONE_EXIT());
System.in.read();
} catch (Exception e) {
} finally {
wsTCP.close();
}
| public java.util.List | parseDeploymentDescriptor()
final DeploymentDescriptorParser<TCPAdapter> parser = new DeploymentDescriptorParser<TCPAdapter>(
initClassLoader, new TCPResourceLoader(context), null, TCPAdapter.FACTORY);
final URL sunJaxWsXml = context.getResource(JAXWS_RI_RUNTIME);
return parser.parse(sunJaxWsXml.toExternalForm(), sunJaxWsXml.openStream());
| public void | process()
connector = initialize();
|
|