net.javacrumbs.mocksocket.connection
Class ConnectionFactoryMockSocketImpl

java.lang.Object
  extended by java.net.SocketImpl
      extended by net.javacrumbs.mocksocket.AbstractMockSocketImpl
          extended by net.javacrumbs.mocksocket.connection.ConnectionFactoryMockSocketImpl
All Implemented Interfaces:
SocketOptions

public class ConnectionFactoryMockSocketImpl
extends AbstractMockSocketImpl

MockSocket impl that uses a ConnectionFactory.

Author:
Lukas Krecan

Field Summary
 
Fields inherited from class java.net.SocketImpl
address, fd, localport, port
 
Fields inherited from interface java.net.SocketOptions
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
 
Constructor Summary
ConnectionFactoryMockSocketImpl(ConnectionFactory connectionFactory)
           
 
Method Summary
protected  InputStream getInputStream()
           
protected  OutputStream getOutputStream()
           
protected  void onConnect(String address)
          Onvoked on a connect method call.
 
Methods inherited from class net.javacrumbs.mocksocket.AbstractMockSocketImpl
accept, available, bind, close, connect, connect, connect, create, getOption, listen, sendUrgentData, setOption
 
Methods inherited from class java.net.SocketImpl
getFileDescriptor, getInetAddress, getLocalPort, getPort, setPerformancePreferences, shutdownInput, shutdownOutput, supportsUrgentData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionFactoryMockSocketImpl

public ConnectionFactoryMockSocketImpl(ConnectionFactory connectionFactory)
Method Detail

onConnect

protected void onConnect(String address)
Description copied from class: AbstractMockSocketImpl
Onvoked on a connect method call.

Specified by:
onConnect in class AbstractMockSocketImpl
Parameters:
address - host:port

getInputStream

protected InputStream getInputStream()
                              throws IOException
Specified by:
getInputStream in class SocketImpl
Throws:
IOException

getOutputStream

protected OutputStream getOutputStream()
                                throws IOException
Specified by:
getOutputStream in class SocketImpl
Throws:
IOException


Copyright © 2011. All Rights Reserved.