Package fr.dyade.aaa.agent
Class HttpsNetwork
- java.lang.Object
-
- fr.dyade.aaa.agent.Network
-
- fr.dyade.aaa.agent.StreamNetwork
-
- fr.dyade.aaa.agent.HttpNetwork
-
- fr.dyade.aaa.agent.HttpsNetwork
-
- All Implemented Interfaces:
HttpNetworkMBean,MessageComparator,MessageConsumer,NetworkMBean
public final class HttpsNetwork extends HttpNetwork
HttpNetwork is a specialization of HttpNetwork for SSL.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.dyade.aaa.agent.HttpNetwork
HttpNetwork.NetServerIn, HttpNetwork.NetServerOut, HttpNetwork.NetworkInputStream, HttpNetwork.NetworkOutputStream
-
Nested classes/interfaces inherited from class fr.dyade.aaa.agent.Network
Network.NetworkAverageLoadTask
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEYFILEName of property that allow to fix the keystore's pathname: "HttpsNetwork.keyfile".static StringPASSName of property that allow to fix the keystore's password: "HttpsNetwork.pass".private SSLServerSocketFactorysslServerSocketFactoryHttpsNetwork needs specific use of SSLServerSocketFactory.private SSLSocketFactorysslSocketFactoryHttpsNetwork needs specific use of SSLSocketFactory.-
Fields inherited from class fr.dyade.aaa.agent.HttpNetwork
activationPeriod, dmon, NbDaemon, proxyhost, proxyport, server
-
Fields inherited from class fr.dyade.aaa.agent.StreamNetwork
backlog, CnxRetry, ConnectTimeout, inLocalAddr, outLocalAddr, outLocalPort, serverSocketFactory, socketFactory, SoLinger, SoTimeout, TcpNoDelay
-
Fields inherited from class fr.dyade.aaa.agent.Network
ALREADY_DELIVERED, averageLoadTask, bootTSFN, DEBUG, DELIVER, domain, idxLS, logger, name, nbMessageIn, nbMessageOut, port, qout, servers, serversFN, sid, WDActivationPeriod, WDNbRetryLevel1, WDNbRetryLevel2, WDRetryPeriod1, WDRetryPeriod2, WDRetryPeriod3
-
-
Constructor Summary
Constructors Constructor Description HttpsNetwork()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ServerSocketcreateServerSocket(int port)This method creates and returns a SSL server socket which is bound to the specified port.(package private) SocketcreateSocket(InetAddress addr, int port)This method creates and returns a SSL socket connected to a ServerSocket at the specified network address and port.(package private) SocketcreateTunnelSocket(InetAddress host, int port, InetAddress proxy, int proxyport)This method creates a tunnelling socket if a proxy is used.private voiddoTunnelHandshake(Socket tunnel, InetAddress host, int port)private SSLServerSocketFactorygetSSLServerSocketFactory()private SSLSocketFactorygetSSLSocketFactory()-
Methods inherited from class fr.dyade.aaa.agent.HttpNetwork
getActivationPeriod, getNbDaemon, getProxyhost, getProxyport, getReply, getRequest, handle, init, isRunning, readLine, sendReply, sendRequest, setActivationPeriod, start, stop, toString, wakeup
-
Methods inherited from class fr.dyade.aaa.agent.StreamNetwork
createServerSocket, createSocket, createSocket, setProperties, setSocketOption
-
Methods inherited from class fr.dyade.aaa.agent.Network
addServer, channelPostAndValidate, checkActive, delete, deleteMessage, deliver, delServer, getAverageLoad1, getAverageLoad15, getAverageLoad5, getBootTS, getDomainName, getMessageDest, getMessageSource, getName, getNbMessageReceived, getNbMessageSent, getNbWaitingMessages, getPort, getQueue, getStamp, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, index, insert, isPrior, post, postAndValidate, postMessage, prepareMessage, prepareMessageWithoutStamp, resetServer, restore, save, saveChannel, setMessageSource, setPort, setStamp, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3, testBootTS, testRecvUpdate, validate, validateChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.dyade.aaa.agent.NetworkMBean
getAverageLoad1, getAverageLoad15, getAverageLoad5, getName, getNbMessageReceived, getNbMessageSent, getNbWaitingMessages, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3
-
-
-
-
Field Detail
-
PASS
public static final String PASS
Name of property that allow to fix the keystore's password: "HttpsNetwork.pass". By default the password is "changeit". This property can be fixed either fromjavalaunching command (-Dname=value), or by ina3servers.xmlconfiguration file (property element).- See Also:
- Constant Field Values
-
KEYFILE
public static final String KEYFILE
Name of property that allow to fix the keystore's pathname: "HttpsNetwork.keyfile". By default the key file is ".keystore". This property can be fixed either fromjavalaunching command (-Dname=value), or by ina3servers.xmlconfiguration file (property element).- See Also:
- Constant Field Values
-
sslSocketFactory
private SSLSocketFactory sslSocketFactory
HttpsNetwork needs specific use of SSLSocketFactory.
-
sslServerSocketFactory
private SSLServerSocketFactory sslServerSocketFactory
HttpsNetwork needs specific use of SSLServerSocketFactory.
-
-
Method Detail
-
getSSLSocketFactory
private SSLSocketFactory getSSLSocketFactory() throws IOException
- Throws:
IOException
-
getSSLServerSocketFactory
private SSLServerSocketFactory getSSLServerSocketFactory() throws IOException
- Throws:
IOException
-
createServerSocket
ServerSocket createServerSocket(int port) throws IOException
This method creates and returns a SSL server socket which is bound to the specified port.- Overrides:
createServerSocketin classStreamNetwork- Parameters:
port- the port to listen to.- Returns:
- a SSL server socket bound to the specified port.
- Throws:
IOException- for networking errors
-
createSocket
Socket createSocket(InetAddress addr, int port) throws IOException
This method creates and returns a SSL socket connected to a ServerSocket at the specified network address and port.- Overrides:
createSocketin classStreamNetwork- Parameters:
addr- the server address.port- the server port.- Returns:
- a socket connected to a ServerSocket at the specified network address and port.
- Throws:
IOException- if the connection can't be established
-
createTunnelSocket
Socket createTunnelSocket(InetAddress host, int port, InetAddress proxy, int proxyport) throws IOException
This method creates a tunnelling socket if a proxy is used.- Parameters:
host- the server host.port- the server port.proxy- the proxy host.proxyport- the proxy port.- Returns:
- a socket connected to a ServerSocket at the specified network address and port.
- Throws:
IOException- if the connection can't be established
-
doTunnelHandshake
private void doTunnelHandshake(Socket tunnel, InetAddress host, int port) throws IOException
- Throws:
IOException
-
-