java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.MethodEncapsulation
Direct Known Subclasses:
GssapiMethodEncapsulation

public abstract class MethodEncapsulation extends Object
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
    Constructor
    Description
    Allows the construction of subclass instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    Takes the provided plain DatagramSocket and returns based on the negotiated authentication method a DatagramSocket that may encapsulate data to be sent and may de-encapsulate data received.
    abstract Socket
    Returns based on the negotiated authentication method a Socket that may encapsulate data to be sent and may de-encapsulate data received.
    Returns a new instance of MethodEncapsulation that provides plain networking objects such as the provided plain Socket.
    abstract String
    Returns the String representation of this MethodEncapsulation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MethodEncapsulation

      public MethodEncapsulation()
      Allows the construction of subclass instances.
  • Method Details

    • newNullInstance

      public static MethodEncapsulation newNullInstance(Socket sock)
      Returns a new instance of MethodEncapsulation that provides plain networking objects such as the provided plain Socket.
      Parameters:
      sock - the provided plain Socket
      Returns:
      a new instance of MethodEncapsulation that provides plain networking objects such as the provided plain Socket
    • getDatagramSocket

      public abstract DatagramSocket getDatagramSocket(DatagramSocket datagramSocket) throws IOException
      Takes the provided plain DatagramSocket and returns based on the negotiated authentication method a DatagramSocket that may encapsulate data to be sent and may de-encapsulate data received.
      Parameters:
      datagramSocket - the provided plain DatagramSocket
      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

      public abstract Socket getSocket()
      Returns based on the negotiated authentication method a Socket 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

      public abstract String toString()
      Returns the String representation of this MethodEncapsulation.
      Overrides:
      toString in class Object
      Returns:
      the String representation of this MethodEncapsulation