Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.comm.udp
Class UDPChannel
com.newstep.solid.comm.AbstractChannel
  |
  +--com.newstep.solid.comm.udp.UDPChannel
All Implemented Interfaces:
       Channel, IOHandler

public class UDPChannel      
Implements:
IOHandler
 
Links:
Kernel Association Association Link
to Class Multiplexor
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
Kernel Association Association Link
to Class IPAddress
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
Kernel Association Association Link
to Class IPAddress
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
Implementation Implementation Link
to Interface IOHandler
 
Generalization Generalization Link
to Class AbstractChannel
 
 

Field Summary
String
private ByteBuffer
private DatagramChannel
private int
private IPAddress
private Multiplexor
private String
private IPAddress
Method Summary
public void
public DatagramChannel
public int
public Address
public Address
public void
init(Multiplexor muxi, SelectableChannel channel, IPAddress address, IPAddress localAddr, ByteBuffer buff)
public void
onAccept(SelectionKey key)
public void
onClosed(SelectableChannel channel)
public void
public void
public void
onRead(SelectionKey key)
public void
onWrite(SelectionKey key)
public void
public void
public void
public void
setName(String name)
public String
public void
write(Message message)
Field Detail
buffer
private ByteBuffer buffer
Multiplicity:
1
 

datagramChannel
private DatagramChannel datagramChannel
Multiplicity:
1
 

interestOps
private int interestOps
Multiplicity:
1
 

localAddress
IPAddress localAddress
 

localAddress
private IPAddress localAddress
Multiplicity:
1
 

mux
private Multiplexor mux
Multiplicity:
1
 

name
String name
 

name
private String name
Multiplicity:
1
 

remoteAddress
private IPAddress remoteAddress
Multiplicity:
1
 
Method Detail
close
public void close ()
 
Channel interface. Closes the chanel
Throws:
ChannelException
 

getDatagram
public DatagramChannel getDatagram ()
 
 

getInterestedOps
public int getInterestedOps ()
 
Returns the inetersted operations for this handler
 

getLocalAddress
public Address getLocalAddress ()
 
Returns the local address
 

getRemoteAddress
public Address getRemoteAddress ()
 
Returns the remote address
 

init
public void init (Multiplexor muxi, SelectableChannel channel, IPAddress address, IPAddress localAddr, ByteBuffer buff)
 
Initializes a UDP channel.
Parameters:
muxi
channel
address
localAddr
buff
 

onAccept
public void onAccept (SelectionKey key)
 
Not valid for UDP channel
Throws:
ChannelException
 

onClosed
public void onClosed (SelectableChannel channel)
 
 

onConnect
public void onConnect ()
 
Channel interface. Not valid for UDP
Throws:
ChannelException
 

onDone
public void onDone ()
 
 

onRead
public void onRead (SelectionKey key)
 
Channel interface. Receives the datagram
Throws:
ChannelException
 

onWrite
public void onWrite (SelectionKey key)
 
Channel interface. Sends the datagram
Throws:
ChannelException
 

open
public void open ()
 
Channel interface. Opens the channel and registers it with the selector
Throws:
ChannelException
 

passMessage
public void passMessage (Message message)
 
Passes the message up to the channel listener
Parameters:
message
 

setLocalAddress
public void setLocalAddress (IPAddress localAddress)
 
Assigns the local address of the channel
Parameters:
localAddress
 

setName
public void setName (String name)
 
Assigns the name of the channel
Parameters:
name
 

toString
public String toString ()
 
 

write
public void write (Message message)
 
Channel interface. Puts the message into the writing queue and registers
the OP_WRITE with the mux
Throws:
ChannelException
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD