public class ProtocolStack.Ptr extends Object
ProtocolLayer is in the ProtocolStack.| Modifier and Type | Method and Description |
|---|---|
void |
doCloseSend()
Requests the next layer down the stack to close output.
|
void |
doSend(ByteBuffer data)
Each
ProtocolLayer.Send should call this method to hand data for sending down the stack to the next
ProtocolLayer (except for the NetworkLayer which should eat the data). |
boolean |
isRecvOpen()
Checks if the next layer up the stack is open to receive data.
|
boolean |
isSendOpen()
Checks if the next layer down the stack is open to send data.
|
void |
onRecv(ByteBuffer data)
Each
ProtocolLayer.Recv should call this method to hand received data up the stack to the next
ProtocolLayer (except for the ApplicationLayer which should eat the data). |
void |
onRecvClosed(IOException cause)
Notify the next layer up the stack that input has been closed.
|
void |
remove()
Requests removal of this
ProtocolLayer from the ProtocolStack |
ProtocolStack<?> |
stack()
Helper method to access the
ProtocolStack. |
public void onRecv(ByteBuffer data) throws IOException
ProtocolLayer.Recv should call this method to hand received data up the stack to the next
ProtocolLayer (except for the ApplicationLayer which should eat the data).data - the data to submit to the next layer up the stack.IOException - if the next layer could not process the data.public void doSend(ByteBuffer data) throws IOException
ProtocolLayer.Send should call this method to hand data for sending down the stack to the next
ProtocolLayer (except for the NetworkLayer which should eat the data).data - the data to submit to the next layer down the stack.IOException - if the next layer could not process the data.public boolean isRecvOpen()
true if the next layer up the stack is open to receive data.public boolean isSendOpen()
true if the next layer down the stack is open to send data.public ProtocolStack<?> stack()
ProtocolStack.ProtocolStack.public void remove()
ProtocolLayer from the ProtocolStackpublic void doCloseSend()
throws IOException
IOException - if there was an error closing the output.public void onRecvClosed(IOException cause) throws IOException
cause - the cause of the lower layer being closed or null.IOException - if there was an error processing the close notification.Copyright © 2004–2022. All rights reserved.