public abstract class AbstractRouter extends java.lang.Object implements ConnectionRouter
ConnectionRouter.NullConnectionRouter
NULL
Constructor and Description |
---|
AbstractRouter() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getConstraint(Connection connection)
Returns the constraint for the given Connection.
|
protected Point |
getEndPoint(Connection connection)
A convenience method for obtaining a connection's endpoint.
|
protected Point |
getStartPoint(Connection conn)
A convenience method for obtaining a connection's start point.
|
void |
invalidate(Connection connection)
Causes the router to discard any cached information about the given
Connection.
|
void |
remove(Connection connection)
Removes the given Connection from this routers list of Connections it is
responsible for.
|
void |
setConstraint(Connection connection,
java.lang.Object constraint)
Sets the constraint for the given Connection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
route
public java.lang.Object getConstraint(Connection connection)
getConstraint
in interface ConnectionRouter
connection
- The connectionprotected Point getEndPoint(Connection connection)
ConnectionAnchor
. The returned Point
is a static singleton that is reused to reduce garbage collection. The
caller may modify this point in any way. However, the point will be
reused and its values overwritten during the next call to this method.connection
- The connectionprotected Point getStartPoint(Connection conn)
ConnectionAnchor
. The returned Point
is a static singleton that is reused to reduce garbage collection. The
caller may modify this point in any way. However, the point will be
reused and its values overwritten during the next call to this method.conn
- The connectionpublic void invalidate(Connection connection)
invalidate
in interface ConnectionRouter
connection
- The connection to invalidatepublic void remove(Connection connection)
remove
in interface ConnectionRouter
connection
- The connection to removepublic void setConstraint(Connection connection, java.lang.Object constraint)
setConstraint
in interface ConnectionRouter
connection
- The connectionconstraint
- The constraintCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.