org.productivity.java.syslog4j.server.impl.net.tcp.ssl.SSLTCPNetSyslogServerConfig Java Examples
The following examples show how to use
org.productivity.java.syslog4j.server.impl.net.tcp.ssl.SSLTCPNetSyslogServerConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Syslog4jAppenderTest.java From logback-syslog4j with MIT License | 6 votes |
protected void setUp() { serverStream = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(serverStream); final TCPNetSyslogServerConfig tcpNetSyslogServerConfig = new TCPNetSyslogServerConfig(45553); tcpNetSyslogServerConfig.addEventHandler(new PrintStreamSyslogServerEventHandler(ps)); final UDPNetSyslogServerConfig udpNetSyslogServerConfig = new UDPNetSyslogServerConfig(45553); udpNetSyslogServerConfig.addEventHandler(new PrintStreamSyslogServerEventHandler(ps)); final SSLTCPNetSyslogServerConfig ssltcpNetSyslogServerConfig = new SSLTCPNetSyslogServerConfig(); ssltcpNetSyslogServerConfig.setPort(45554); ssltcpNetSyslogServerConfig.addEventHandler(new PrintStreamSyslogServerEventHandler(ps)); ssltcpNetSyslogServerConfig.setKeyStore(this.getClass().getClassLoader().getResource("test-keystore.jks").getFile()); ssltcpNetSyslogServerConfig.setKeyStorePassword("password"); ssltcpNetSyslogServerConfig.setTrustStore(this.getClass().getClassLoader().getResource("test-keystore.jks").getFile()); ssltcpNetSyslogServerConfig.setTrustStorePassword("password"); SyslogServer.createThreadedInstance("testTcp", tcpNetSyslogServerConfig); SyslogServer.createThreadedInstance("testUdp", udpNetSyslogServerConfig); SyslogServer.createThreadedInstance("testTls", ssltcpNetSyslogServerConfig); }
Example #2
Source File: PooledSSLTCPNetSyslog4jTest.java From syslog4j with GNU Lesser General Public License v2.1 | 5 votes |
protected String getServerProtocol() throws Exception { SSLTCPNetSyslogServerConfigIF config = new SSLTCPNetSyslogServerConfig(); SSLConfigUtil.configure(config); SyslogServer.createThreadedInstance("pooledSslTcp", config); return "pooledSslTcp"; }
Example #3
Source File: SSLTCPNetSyslog4jTest.java From syslog4j with GNU Lesser General Public License v2.1 | 4 votes |
protected void setupSslServer() throws Exception { SSLTCPNetSyslogServerConfigIF config = new SSLTCPNetSyslogServerConfig(); SSLConfigUtil.configure(config); SyslogServer.createInstance("sslTcp", config); }