public class StreamManagementIOProcessor extends Object implements XMPPIOProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
StreamManagementIOProcessor.Counter
Counter class implements proper counter with overflow from 2^32-1 to 0
|
static class |
StreamManagementIOProcessor.OutQueue
OutQueue class implements queue of outgoing packets waiting for ack
with implementation of removing acked elements when id of acked packet
is passed
|
| Constructor and Description |
|---|
StreamManagementIOProcessor() |
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Returns identifier of processor
|
static boolean |
isEnabled(XMPPIOService service)
Method returns true if XMPPIOService has enabled SM.
|
protected StreamManagementIOProcessor.Counter |
newCounter() |
protected StreamManagementIOProcessor.OutQueue |
newOutQueue() |
void |
packetsSent(XMPPIOService service)
Method is called when all waiting data was written to socket.
|
void |
processCommand(XMPPIOService service,
Packet pc)
Process command execution which may be sent from other component and
should be processed by processor
|
boolean |
processIncoming(XMPPIOService service,
Packet packet)
Process packets read from socket as they are sent to SessionManager.
|
boolean |
processOutgoing(XMPPIOService service,
Packet packet)
Process outgoing packets as they are added to XMPPIOService outgoing
packets queue.
|
boolean |
serviceStopped(XMPPIOService service,
boolean streamClosed)
Method called when XMPPIOService is closed.
|
void |
setConnectionManager(ConnectionManager connectionManager)
Sets connection manager instance for which this XMPPIOProcessor is used
|
void |
setProperties(Map<String,Object> props)
Method used for setting properties
|
protected boolean |
shouldRequestAck(XMPPIOService service,
StreamManagementIOProcessor.OutQueue outQueue)
Override this method to define a custom behaviour for request ack.
|
tigase.xml.Element[] |
supStreamFeatures(XMPPIOService service)
Returns array of features added by this processor
|
public static final String XMLNS
public static boolean isEnabled(XMPPIOService service)
service - public String getId()
XMPPIOProcessorgetId in interface XMPPIOProcessorpublic void setConnectionManager(ConnectionManager connectionManager)
XMPPIOProcessorsetConnectionManager in interface XMPPIOProcessorpublic tigase.xml.Element[] supStreamFeatures(XMPPIOService service)
XMPPIOProcessorsupStreamFeatures in interface XMPPIOProcessorpublic boolean processIncoming(XMPPIOService service, Packet packet)
XMPPIOProcessorprocessIncoming in interface XMPPIOProcessorpublic boolean processOutgoing(XMPPIOService service, Packet packet)
XMPPIOProcessorprocessOutgoing in interface XMPPIOProcessorpublic void packetsSent(XMPPIOService service) throws IOException
XMPPIOProcessorpacketsSent in interface XMPPIOProcessorIOExceptionprotected boolean shouldRequestAck(XMPPIOService service, StreamManagementIOProcessor.OutQueue outQueue)
ack_request_count
packets waiting, so you probably want to OR your behaviour with this.public void processCommand(XMPPIOService service, Packet pc)
XMPPIOProcessorprocessCommand in interface XMPPIOProcessorpublic boolean serviceStopped(XMPPIOService service, boolean streamClosed)
XMPPIOProcessorserviceStopped in interface XMPPIOProcessorpublic void setProperties(Map<String,Object> props)
XMPPIOProcessorsetProperties in interface XMPPIOProcessorprotected StreamManagementIOProcessor.Counter newCounter()
protected StreamManagementIOProcessor.OutQueue newOutQueue()
Copyright © 2015 "Tigase, Inc.". All rights reserved.