|
Wildfire 3.1.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.wildfire.net.SocketReader
org.jivesoftware.wildfire.net.ClientSocketReader
public class ClientSocketReader
A SocketReader specialized for client connections. This reader will be used when the open stream contains a jabber:client namespace. Received packet will have their FROM attribute overriden to avoid spoofing.
By default the hostname specified in the stream header sent by clients will not be validated. When validated the TO attribute of the stream header has to match the server name or a valid subdomain. If the value of the 'to' attribute is not valid then a host-unknown error will be returned. To enable the validation set the system property xmpp.client.validate.host to true.
Field Summary |
---|
Fields inherited from class org.jivesoftware.wildfire.net.SocketReader |
---|
connection, open, serverName, session |
Constructor Summary | |
---|---|
ClientSocketReader(PacketRouter router,
RoutingTable routingTable,
String serverName,
Socket socket,
SocketConnection connection,
boolean useBlockingMode)
|
Method Summary | |
---|---|
protected void |
processIQ(IQ packet)
Process the received IQ packet. |
protected void |
processMessage(Message packet)
Process the received Message packet. |
protected void |
processPresence(Presence packet)
Process the received Presence packet. |
protected boolean |
processUnknowPacket(org.dom4j.Element doc)
Only packets of type Message, Presence and IQ can be processed by this class. |
Methods inherited from class org.jivesoftware.wildfire.net.SocketReader |
---|
createSession, process, run, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientSocketReader(PacketRouter router, RoutingTable routingTable, String serverName, Socket socket, SocketConnection connection, boolean useBlockingMode)
Method Detail |
---|
protected void processIQ(IQ packet) throws UnauthorizedException
SocketReader
PacketInterceptor
will be invoked before
and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
processIQ
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected void processPresence(Presence packet) throws UnauthorizedException
SocketReader
PacketInterceptor
will be invoked before
and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
processPresence
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected void processMessage(Message packet) throws UnauthorizedException
SocketReader
PacketInterceptor
will be invoked before
and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
processMessage
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected boolean processUnknowPacket(org.dom4j.Element doc)
doc
- the unknown DOM element that was received
|
Wildfire 3.1.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |