com.devexperts.qd.qtp.socket
Interface SocketMessageAdapterFactory

All Superinterfaces:
MessageAdapter.Factory

public interface SocketMessageAdapterFactory
extends MessageAdapter.Factory

This interface should be implemented by MessageAdapter.Factory in order to run any custom authorization/authentication protocol with remote host. All socket connectors check instance of MessageAdapter.Factory for implementation of SocketMessageAdapterFactory and pass a corresponding socket to createAdapterWithSocket(java.net.Socket, com.devexperts.qd.stats.QDStats) method on a freshly openned socket.


Method Summary
 MessageAdapter createAdapterWithSocket(java.net.Socket socket, QDStats stats)
          Runs custom authorization/authentication protocol over given socket and returns MessageAdapter for communication with remote host.
 
Methods inherited from interface com.devexperts.qd.qtp.MessageAdapter.Factory
createAdapter
 

Method Detail

createAdapterWithSocket

MessageAdapter createAdapterWithSocket(java.net.Socket socket,
                                       QDStats stats)
                                       throws java.lang.SecurityException,
                                              java.io.IOException
Runs custom authorization/authentication protocol over given socket and returns MessageAdapter for communication with remote host.

Parameters:
socket - The socket.
stats - QDStats for new message adapter.
Returns:
New MessageAdapter or null if remote host cannot be authenticated/authorized without explicit reason to report via exception.
Throws:
java.lang.SecurityException - If remote host cannot be authorized/authenticated.
java.io.IOException - If there is a communication error with remote host.