com.aelitis.net.udp.uc.impl
Class PRUDPPacketHandlerSocks

java.lang.Object
  extended by com.aelitis.net.udp.uc.impl.PRUDPPacketHandlerSocks
All Implemented Interfaces:
PRUDPPacketHandlerImpl.PacketTransformer, PRUDPPacketHandler

public class PRUDPPacketHandlerSocks
extends java.lang.Object
implements PRUDPPacketHandler, PRUDPPacketHandlerImpl.PacketTransformer


Field Summary
 
Fields inherited from interface com.aelitis.net.udp.uc.PRUDPPacketHandler
PRIORITY_HIGH, PRIORITY_IMMEDIATE, PRIORITY_LOW, PRIORITY_MEDIUM
 
Constructor Summary
protected PRUDPPacketHandlerSocks(java.net.InetSocketAddress _target)
           
 
Method Summary
 void addPrimordialHandler(PRUDPPrimordialHandler handler)
           
 void closeSession()
           
 void destroy()
           
 java.net.InetAddress getBindIP()
           
 int getPort()
           
 PRUDPRequestHandler getRequestHandler()
           
 PRUDPPacketHandlerStats getStats()
           
 boolean hasPrimordialHandler()
           
 PRUDPPacketHandler openSession(java.net.InetSocketAddress target)
           
 void primordialSend(byte[] data, java.net.InetSocketAddress target)
           
 void removePrimordialHandler(PRUDPPrimordialHandler handler)
           
 void send(PRUDPPacket request_packet, java.net.InetSocketAddress destination_address)
          Send only
 PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth, PRUDPPacket request_packet, java.net.InetSocketAddress destination_address)
          Synchronous send and receive
 PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth, PRUDPPacket request_packet, java.net.InetSocketAddress destination_address, long timeout_millis)
           
 PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth, PRUDPPacket request_packet, java.net.InetSocketAddress destination_address, long timeout_millis, int priority)
           
 void sendAndReceive(PRUDPPacket request_packet, java.net.InetSocketAddress destination_address, PRUDPPacketReceiver receiver, long timeout, int priority)
          Asynchronous send and receive
 void setDelays(int send_delay, int receive_delay, int queued_request_timeout)
           
 void setExplicitBindAddress(java.net.InetAddress address)
           
 void setRequestHandler(PRUDPRequestHandler request_handler)
           
 void transformReceive(java.net.DatagramPacket packet)
           
 void transformSend(java.net.DatagramPacket packet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PRUDPPacketHandlerSocks

protected PRUDPPacketHandlerSocks(java.net.InetSocketAddress _target)
                           throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException
Method Detail

transformSend

public void transformSend(java.net.DatagramPacket packet)
Specified by:
transformSend in interface PRUDPPacketHandlerImpl.PacketTransformer

transformReceive

public void transformReceive(java.net.DatagramPacket packet)
Specified by:
transformReceive in interface PRUDPPacketHandlerImpl.PacketTransformer

sendAndReceive

public void sendAndReceive(PRUDPPacket request_packet,
                           java.net.InetSocketAddress destination_address,
                           PRUDPPacketReceiver receiver,
                           long timeout,
                           int priority)
                    throws PRUDPPacketHandlerException
Description copied from interface: PRUDPPacketHandler
Asynchronous send and receive

Specified by:
sendAndReceive in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

sendAndReceive

public PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth,
                                  PRUDPPacket request_packet,
                                  java.net.InetSocketAddress destination_address)
                           throws PRUDPPacketHandlerException
Description copied from interface: PRUDPPacketHandler
Synchronous send and receive

Specified by:
sendAndReceive in interface PRUDPPacketHandler
Returns:
Throws:
PRUDPPacketHandlerException

sendAndReceive

public PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth,
                                  PRUDPPacket request_packet,
                                  java.net.InetSocketAddress destination_address,
                                  long timeout_millis)
                           throws PRUDPPacketHandlerException
Specified by:
sendAndReceive in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

sendAndReceive

public PRUDPPacket sendAndReceive(java.net.PasswordAuthentication auth,
                                  PRUDPPacket request_packet,
                                  java.net.InetSocketAddress destination_address,
                                  long timeout_millis,
                                  int priority)
                           throws PRUDPPacketHandlerException
Specified by:
sendAndReceive in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

send

public void send(PRUDPPacket request_packet,
                 java.net.InetSocketAddress destination_address)
          throws PRUDPPacketHandlerException
Description copied from interface: PRUDPPacketHandler
Send only

Specified by:
send in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

getRequestHandler

public PRUDPRequestHandler getRequestHandler()
Specified by:
getRequestHandler in interface PRUDPPacketHandler

setRequestHandler

public void setRequestHandler(PRUDPRequestHandler request_handler)
Specified by:
setRequestHandler in interface PRUDPPacketHandler

primordialSend

public void primordialSend(byte[] data,
                           java.net.InetSocketAddress target)
                    throws PRUDPPacketHandlerException
Specified by:
primordialSend in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

hasPrimordialHandler

public boolean hasPrimordialHandler()
Specified by:
hasPrimordialHandler in interface PRUDPPacketHandler

addPrimordialHandler

public void addPrimordialHandler(PRUDPPrimordialHandler handler)
Specified by:
addPrimordialHandler in interface PRUDPPacketHandler

removePrimordialHandler

public void removePrimordialHandler(PRUDPPrimordialHandler handler)
Specified by:
removePrimordialHandler in interface PRUDPPacketHandler

getPort

public int getPort()
Specified by:
getPort in interface PRUDPPacketHandler

getBindIP

public java.net.InetAddress getBindIP()
Specified by:
getBindIP in interface PRUDPPacketHandler

setDelays

public void setDelays(int send_delay,
                      int receive_delay,
                      int queued_request_timeout)
Specified by:
setDelays in interface PRUDPPacketHandler

setExplicitBindAddress

public void setExplicitBindAddress(java.net.InetAddress address)
Specified by:
setExplicitBindAddress in interface PRUDPPacketHandler

getStats

public PRUDPPacketHandlerStats getStats()
Specified by:
getStats in interface PRUDPPacketHandler

openSession

public PRUDPPacketHandler openSession(java.net.InetSocketAddress target)
                               throws PRUDPPacketHandlerException
Specified by:
openSession in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

closeSession

public void closeSession()
                  throws PRUDPPacketHandlerException
Specified by:
closeSession in interface PRUDPPacketHandler
Throws:
PRUDPPacketHandlerException

destroy

public void destroy()
Specified by:
destroy in interface PRUDPPacketHandler