Class MethodEncapsulation
java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.MethodEncapsulation
- Direct Known Subclasses:
GssapiAuthMethodEncapsulation
Provides based on the negotiated authentication method networking objects
that may encapsulate data to be sent and may de-encapsulate data received.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract DatagramSocketgetDatagramSocket(DatagramSocket datagramSocket) Takes the provided plainDatagramSocketand returns based on the negotiated authentication method aDatagramSocketthat may encapsulate data to be sent and may de-encapsulate data received.abstract SocketReturns based on the negotiated authentication method aSocketthat may encapsulate data to be sent and may de-encapsulate data received.static MethodEncapsulationnewNullInstance(Socket sock) Returns a new instance ofMethodEncapsulationthat provides plain networking objects such as the provided plainSocket.abstract StringtoString()Returns theStringrepresentation of thisMethodEncapsulation.
-
Constructor Details
-
MethodEncapsulation
public MethodEncapsulation()Allows the construction of subclass instances.
-
-
Method Details
-
newNullInstance
Returns a new instance ofMethodEncapsulationthat provides plain networking objects such as the provided plainSocket.- Parameters:
sock- the provided plainSocket- Returns:
- a new instance of
MethodEncapsulationthat provides plain networking objects such as the provided plainSocket
-
getDatagramSocket
Takes the provided plainDatagramSocketand returns based on the negotiated authentication method aDatagramSocketthat may encapsulate data to be sent and may de-encapsulate data received.- Parameters:
datagramSocket- the provided plainDatagramSocket- Returns:
- based on the negotiated authentication method a
DatagramSocketthat may encapsulate data to be sent and may de-encapsulate data received - Throws:
IOException- if an I/O error occurs
-
getSocket
Returns based on the negotiated authentication method aSocketthat may encapsulate data to be sent and may de-encapsulate data received.- Returns:
- based on the negotiated authentication method a
Socketthat may encapsulate data to be sent and may de-encapsulate data received
-
toString
Returns theStringrepresentation of thisMethodEncapsulation.
-