|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectau.com.loftinspace.tcpreflector.TcpReflector
Accepts client socket connections and establishes reflector sessions for each new connection.
| Constructor Summary | |
TcpReflector(int listeningPort,
java.net.InetSocketAddress destination)
|
|
| Method Summary | |
void |
addListener(PacketListener listener)
Adds a packet listener to this instance. |
java.net.InetSocketAddress |
getDestination()
Get the destination internet address for connections. |
java.util.List |
getPacketListeners()
Returns an unmodifiable list of all PacketListeners associated with this instance. |
boolean |
isConnective()
Returns whether this instance will accept new socket connections. |
boolean |
isReflective()
Whether this reflector is redirecting packets. |
void |
removeAllListeners()
Removes all PacketListeners from this instance. |
void |
removeListener(PacketListener listener)
Removes a PacketListener from this instance. |
void |
run()
|
void |
setConnective(boolean connective)
Sets whether this instance will accept connections. |
void |
setDestination(java.net.InetSocketAddress destination)
Set the destination internet address for future connections. |
void |
setReflective(boolean reflective)
Whether this reflector should discard or redirect both incoming and outgoing packets. |
void |
setResponseReflective(boolean reflective)
Whether this reflector should discard or redirect incoming packets. |
void |
shutdown()
Causes the reflector to terminate all processing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TcpReflector(int listeningPort,
java.net.InetSocketAddress destination)
throws java.io.IOException
| Method Detail |
public void run()
run in interface java.lang.Runnablepublic void setReflective(boolean reflective)
reflective - true to redirect packets.false to discard them.public void setResponseReflective(boolean reflective)
reflective - true to deliver incoming packets.false to discard them.public boolean isReflective()
true if it redirects packets.false if it discards them.public java.util.List getPacketListeners()
public void addListener(PacketListener listener)
public void removeListener(PacketListener listener)
public void removeAllListeners()
public java.net.InetSocketAddress getDestination()
public void setDestination(java.net.InetSocketAddress destination)
destination - The destination for future connections.public boolean isConnective()
public void setConnective(boolean connective)
throws java.io.IOException
connective - Whether this instance should accept connections.
java.io.IOException - If a problem is encountered establishing or shutting down the underlying ServerSocket
connection.public void shutdown()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||