|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epam.common.transport.client.udp.UDPTransport
public class UDPTransport
UDP transport implementation.
| Constructor Summary | |
|---|---|
UDPTransport()
Creates UDP transport. |
|
UDPTransport(String multicastAddress,
int port)
Creates UDP transport. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the transport. |
String |
getAddress()
Getter for address value. |
int |
getPort()
Getter for port value. |
boolean |
isBlockingSocket()
|
boolean |
isOpen()
Returns true if, transport is open. |
void |
open()
Method opens the transport. |
int |
read(byte[] buffer)
Transport dependent read method. |
int |
read(byte[] buffer,
int offset,
int length)
Transport dependent read method. |
int |
read(ByteBuffer buffer)
|
int |
read(ByteBuffer buffer,
int offset,
int length)
|
void |
setAddress(String multicastAddress)
Setter for multicat address. |
void |
setBufferSize(int bufferSize)
|
void |
setNetworkInterfaceName(String networkInterface)
Setter for network interface. |
void |
setPort(int port)
Setter for port. |
void |
setSocketFactory(SocketFactory socketFactory)
|
void |
waitUntilReadyToWrite()
|
void |
write(byte[] message)
Transport dependent write method. |
int |
write(byte[] message,
int offset,
int length)
Transport dependent write method. |
int |
write(ByteBuffer buffer)
|
int |
write(ByteBuffer buffer,
int offset,
int length)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPTransport()
public UDPTransport(String multicastAddress,
int port)
multicastAddress - the multicast addressport - the transport port| Method Detail |
|---|
public void setSocketFactory(SocketFactory socketFactory)
setSocketFactory in interface ClientTransportpublic boolean isBlockingSocket()
isBlockingSocket in interface Transportpublic void setNetworkInterfaceName(String networkInterface)
networkInterface - public void setBufferSize(int bufferSize)
public void setAddress(String multicastAddress)
setAddress in interface ClientTransportmulticastAddress - the multicat addresspublic void setPort(int port)
setPort in interface ClientTransportport - the transport port
public void open()
throws IOException
open in interface TransportIOException - - if an I/O error occurs.
public void close()
throws IOException
close in interface TransportIOException - - if an I/O error occurs.public boolean isOpen()
Transport
isOpen in interface TransportTransport.isOpen()
public void write(byte[] message)
throws IOException
Transport
write in interface Transportmessage - actual message
IOException - if unable to writeTransport.write(byte[])
public int write(byte[] message,
int offset,
int length)
throws IOException
Transport
write in interface Transportmessage - actual messageoffset - the offset in bufferlength - the num of bytes to write
IOException - if unable to write
public int read(byte[] buffer)
throws IOException
Transport
read in interface Transportbuffer - holder for read bytes
IOException - if unable to readTransport.read(byte[])
public int read(byte[] buffer,
int offset,
int length)
throws IOException
Transport
read in interface Transportbuffer - holder for read bytesoffset - in bufferlength - maximum bytes to be read
IOException - if unable to readTransport.read(byte[], int, int)public String getAddress()
Transport
getAddress in interface TransportTransport.getAddress()public int getPort()
Transport
getPort in interface TransportTransport.getPort()
public int write(ByteBuffer buffer)
throws IOException
write in interface ClientTransportwrite in interface TransportIOException
public int write(ByteBuffer buffer,
int offset,
int length)
throws IOException
write in interface ClientTransportwrite in interface TransportIOException
public int read(ByteBuffer buffer,
int offset,
int length)
throws IOException
read in interface ClientTransportread in interface TransportIOException
public int read(ByteBuffer buffer)
throws IOException
read in interface ClientTransportread in interface TransportIOException
public void waitUntilReadyToWrite()
throws IOException
waitUntilReadyToWrite in interface TransportIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||