com.aelitis.net.udp.uc
Interface PRUDPPacketHandler

All Known Implementing Classes:
PRUDPPacketHandlerImpl, PRUDPPacketHandlerSocks

public interface PRUDPPacketHandler


Field Summary
static int PRIORITY_HIGH
           
static int PRIORITY_IMMEDIATE
           
static int PRIORITY_LOW
           
static int PRIORITY_MEDIUM
           
 
Method Summary
 void addPrimordialHandler(PRUDPPrimordialHandler handler)
           
 void closeSession()
           
 void destroy()
           
 InetAddress getBindIP()
           
 int getPort()
           
 PRUDPRequestHandler getRequestHandler()
           
 PRUDPPacketHandlerStats getStats()
           
 boolean hasPrimordialHandler()
           
 PRUDPPacketHandler openSession(InetSocketAddress target)
           
 void primordialSend(byte[] data, InetSocketAddress target)
           
 void removePrimordialHandler(PRUDPPrimordialHandler handler)
           
 void send(PRUDPPacket request_packet, InetSocketAddress destination_address)
          Send only
 PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address)
          Synchronous send and receive
 PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis)
           
 PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis, int priority)
           
 void sendAndReceive(PRUDPPacket request_packet, 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(InetAddress address)
           
 void setRequestHandler(PRUDPRequestHandler request_handler)
           
 

Field Detail

PRIORITY_LOW

static final int PRIORITY_LOW
See Also:
Constant Field Values

PRIORITY_MEDIUM

static final int PRIORITY_MEDIUM
See Also:
Constant Field Values

PRIORITY_HIGH

static final int PRIORITY_HIGH
See Also:
Constant Field Values

PRIORITY_IMMEDIATE

static final int PRIORITY_IMMEDIATE
See Also:
Constant Field Values
Method Detail

sendAndReceive

void sendAndReceive(PRUDPPacket request_packet,
                    InetSocketAddress destination_address,
                    PRUDPPacketReceiver receiver,
                    long timeout,
                    int priority)
                    throws PRUDPPacketHandlerException
Asynchronous send and receive

Parameters:
request_packet -
destination_address -
receiver -
Throws:
PRUDPPacketHandlerException

sendAndReceive

PRUDPPacket sendAndReceive(PasswordAuthentication auth,
                           PRUDPPacket request_packet,
                           InetSocketAddress destination_address)
                           throws PRUDPPacketHandlerException
Synchronous send and receive

Parameters:
auth -
request_packet -
destination_address -
Returns:
Throws:
PRUDPPacketHandlerException

sendAndReceive

PRUDPPacket sendAndReceive(PasswordAuthentication auth,
                           PRUDPPacket request_packet,
                           InetSocketAddress destination_address,
                           long timeout_millis)
                           throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException

sendAndReceive

PRUDPPacket sendAndReceive(PasswordAuthentication auth,
                           PRUDPPacket request_packet,
                           InetSocketAddress destination_address,
                           long timeout_millis,
                           int priority)
                           throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException

send

void send(PRUDPPacket request_packet,
          InetSocketAddress destination_address)
          throws PRUDPPacketHandlerException
Send only

Parameters:
request_packet -
destination_address -
Throws:
PRUDPPacketHandlerException

getRequestHandler

PRUDPRequestHandler getRequestHandler()

setRequestHandler

void setRequestHandler(PRUDPRequestHandler request_handler)

primordialSend

void primordialSend(byte[] data,
                    InetSocketAddress target)
                    throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException

hasPrimordialHandler

boolean hasPrimordialHandler()

addPrimordialHandler

void addPrimordialHandler(PRUDPPrimordialHandler handler)

removePrimordialHandler

void removePrimordialHandler(PRUDPPrimordialHandler handler)

getPort

int getPort()

getBindIP

InetAddress getBindIP()

setDelays

void setDelays(int send_delay,
               int receive_delay,
               int queued_request_timeout)

setExplicitBindAddress

void setExplicitBindAddress(InetAddress address)

getStats

PRUDPPacketHandlerStats getStats()

openSession

PRUDPPacketHandler openSession(InetSocketAddress target)
                               throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException

closeSession

void closeSession()
                  throws PRUDPPacketHandlerException
Throws:
PRUDPPacketHandlerException

destroy

void destroy()