public class JSchSocketFactory extends Object implements com.jcraft.jsch.SocketFactory
SocketFactory that keeps track of the local InetAddress of the
last created Socket.
Copyright (c) 2014. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Constructor and Description |
|---|
JSchSocketFactory() |
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket(String host,
int port) |
InputStream |
getInputStream(Socket socket) |
InetAddress |
getLastLocalAddress()
Obtains the local
InetAddress of the last Socket created. |
OutputStream |
getOutputStream(Socket socket) |
public Socket createSocket(String host, int port) throws IOException
createSocket in interface com.jcraft.jsch.SocketFactoryIOExceptionpublic InputStream getInputStream(Socket socket) throws IOException
getInputStream in interface com.jcraft.jsch.SocketFactoryIOExceptionpublic OutputStream getOutputStream(Socket socket) throws IOException
getOutputStream in interface com.jcraft.jsch.SocketFactoryIOExceptionpublic InetAddress getLastLocalAddress()
InetAddress of the last Socket created.InetAddressCopyright © 2017. All rights reserved.