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

com.newstep.solid.comm.rtt
Class FramingElement
com.newstep.solid.comm.AbstractChannel
  |
  +--com.newstep.solid.comm.ProtocolElement
       |
       +--com.newstep.solid.comm.rtt.FramingElement
All Implemented Interfaces:
       Channel, ChannelListener, ChannelStatusListener

public class FramingElement      
FramingElement layer frames a message according to the protocol expected
upstream and downstream Upstream : RTT Message Downstream: Message
Implements:
ChannelStatusListener
 
Links:
Implementation Implementation Link
to Interface ChannelStatusListener
FramingElement layer frames a message according to the protocol expected
upstream and downstream Upstream : RTT Message Downstream: Message
 
Generalization Generalization Link
to Class ProtocolElement
FramingElement layer frames a message according to the protocol expected
upstream and downstream Upstream : RTT Message Downstream: Message
 
 

Nested Class Summary
private class
MessageState
Field Summary
private static String
private int
private ByteBuffer
private ByteBuffer
private int
private MessageState
MessageState
HEADER_PENDING
MessageState
MESSAGE_PENDING
MessageState
MESSAGE_READY
MessageState
NEW
MessageState
VALIDATE
Constructor Summary
public void
Method Summary
public void
public void
public void
public void
public String
public void
write(Message message)
Field Detail
className
private static String className
Multiplicity:
1
Static.
 

currentLength
private int currentLength
Multiplicity:
1
 

dataBuffer
private ByteBuffer dataBuffer
Multiplicity:
1
 

fixedBuffer
private ByteBuffer fixedBuffer
Multiplicity:
1
 

length
private int length
Multiplicity:
1
 

messageState
private MessageState messageState
Multiplicity:
1
 
Constructor Detail
FramingElement
public void FramingElement ()
 
Stereotype:
create
 
Method Detail
close
public void close ()
 
Passes the close() downstream
Throws:
ChannelException
 

onMessage
public void onMessage (Message message)
 
Frames the message according to the RTT Protocol and passes the message
upstream
Parameters:
message
Message
Custom properties
pre:
message != null
 

open
public void open ()
 
Throws:
ChannelException
 

statusChanged
public void statusChanged (Channel channel, ChannelState state)
 
StatusListener interface. Receives notifies of the sub channel status
Parameters:
channel
Channel
state
ChannelState
 

toString
public String toString ()
 
 

write
public void write (Message message)
 
Packs the header and passes down to next layer
Parameters:
message
Message
Throws:
ChannelException
 

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