|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.webcache.invalidation.InvalidationConnection
This class represents a Web Cache connection over which invalidation messages may be sent, either synchronously or asynchronously.
Connection details (such as the hostname and port number of the Web Cache) are read from an XML configuration file.
Constructor Summary |
Type | Constructor |
---|---|
|
InvalidationConnection()
Constructs a Web Cache invalidation connection over which an invalidation message can be sent. |
protected |
InvalidationConnection(oracle.net.http.HttpConnection conn)
|
|
InvalidationConnection(java.lang.String tagName)
Constructs a Web Cache invalidation connection over which an invalidation message can be sent. |
Method Summary |
Type | Method |
---|---|
InvalidationResult |
send(InvalidationMessage msg)
Sends an invalidation message to the Web Cache, in synchronous mode. |
void |
send(InvalidationMessage msg,
oracle.net.http.HttpListener lsnr,
java.lang.Object callbackArg)
Sends an invalidation message to the Web Cache, in asynchronous mode. |
static void |
shutdown()
Terminates all outstanding sender threads. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InvalidationConnection(java.lang.String tagName)
Connection details (such as the hostname and port number of
the Web Cache) are read from an XML configuration file. The
given tagName
parameter identifies which element in the
configuration file contains these details. This element may
appear anywhere in the file (at any depth).
If the element is a simple element (i.e. it has no sub-elements) then it is expected to have the following attributes:
host="<hostname of Web Cache>" port="<invalidation port no.>" authorization="<HTTP Authorization string>"These atttributes define the underlying physical HTTP "connection". A call to
InvalidationConnection#send
will result in an
InvalidationMessage
being sent to the Web Cache over this
connection.
If the element has sub-elements then each of its sub-elements
are expected to be simple elements of the above type. In this
case a corresponding group of physical HTTP "connections" are
associated with this InvalidationConnection
. A call to
InvalidationConnection#send
will result in an
InvalidationMessage
being sent over each connection in
the group.
A "simple" configuration file might look like this: <?xml version="1.0" ?> <webcache> <invalidation host="cache.us.oracle.com" port="4001" authorization="invalidator:invalidator"/> </webcache> A "complex" configuration file might look like this: <?xml version="1.0" ?> <invalidation> <webcache1 host="cache1.us.oracle.com" port="4001" authorization="invalidator:invalidator"/> <webcache2 host="cache2.us.oracle.com" port="4001" authorization="invalidator:invalidator"/> </invalidation>The location of the configuration file is expected to be in the system property "oracle.http.configfile".
public InvalidationConnection()
Equivalent to InvalidationConnection("invalidation")
.
protected InvalidationConnection(oracle.net.http.HttpConnection conn)
Method Detail |
public InvalidationResult send(InvalidationMessage msg)
msg
- an InvalidationMessage
objectInvalidationResult
object
InvalidationMessage
,
InvalidationResult
public void send(InvalidationMessage msg, oracle.net.http.HttpListener lsnr, java.lang.Object callbackArg)
msg
- an InvalidationMessage
objectlsnr
- callback listenercallbackArg
- callback argument
InvalidationMessage
,
HttpListener
public static void shutdown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |