Class MethodEncapsulation
java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.MethodEncapsulation
- Direct Known Subclasses:
GssapiMethodEncapsulation
Provides based on the negotiated authentication method networking objects
that may encapsulate data to be sent and may de-encapsulate data received.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract DatagramSocket
getDatagramSocket
(DatagramSocket datagramSocket) Takes the provided plainDatagramSocket
and returns based on the negotiated authentication method aDatagramSocket
that may encapsulate data to be sent and may de-encapsulate data received.abstract Socket
Returns based on the negotiated authentication method aSocket
that may encapsulate data to be sent and may de-encapsulate data received.static MethodEncapsulation
newNullInstance
(Socket sock) Returns a new instance ofMethodEncapsulation
that provides plain networking objects such as the provided plainSocket
.abstract String
toString()
Returns theString
representation of thisMethodEncapsulation
.
-
Constructor Details
-
MethodEncapsulation
public MethodEncapsulation()Allows the construction of subclass instances.
-
-
Method Details
-
newNullInstance
Returns a new instance ofMethodEncapsulation
that provides plain networking objects such as the provided plainSocket
.- Parameters:
sock
- the provided plainSocket
- Returns:
- a new instance of
MethodEncapsulation
that provides plain networking objects such as the provided plainSocket
-
getDatagramSocket
Takes the provided plainDatagramSocket
and returns based on the negotiated authentication method aDatagramSocket
that 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
DatagramSocket
that 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 aSocket
that may encapsulate data to be sent and may de-encapsulate data received.- Returns:
- based on the negotiated authentication method a
Socket
that may encapsulate data to be sent and may de-encapsulate data received
-
toString
Returns theString
representation of thisMethodEncapsulation
.
-