|
Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache 11g Release 1 (11.1.1) E10665-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcache.invalidation.InvalidationConnection
public class InvalidationConnection
This class represents an Oracle Fusion Middleware 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 | |
---|---|
|
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. |
|
InvalidationConnection(java.lang.String configFile, java.lang.String tagName) Constructs an Oracle Fusion Middleware Web Cache invalidation connection over which an invalidation message can be sent. |
Method Summary | |
---|---|
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. |
InvalidationResult |
send(java.lang.String msg) Sends an invalidation message to the Web Cache, in synchronous mode. |
void |
send(java.lang.String 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 configFile, 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="<obfuscated HTTP Authorization string>"The
authorization
attribute may be omitted; if so, the HTTP Authorization string
will default to the shipped default value ("invalidator:invalidator"). To "obfuscate" the value the user is expected to perform the following two steps:
public static java.lang.String oracle.util.HO.tho(java.lang.String password)
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="03f06e7b2d77faf35eee766d737626900282764f12cc53f56d075ae0befffde354"/> </webcache> A "complex" configuration file might look like this: <?xml version="1.0" ?> <invalidation> <webcache1 host="cache1.us.oracle.com" port="4001"/> <webcache2 host="cache2.us.oracle.com" port="4001" authorization="03f06e7b2d77faf35eee766d737626900282764f12cc53f56d075ae0befffde354"/> </invalidation>
configFile
- name of config file, if null
, the name is expected to be defined by the system property "oracle.http.configuration."tagName
- tag name of element in config file whose attributes define the required connection details. In the above example you would use "invalidation" in the simple case, and in the complex case you would use either "webcache1" or "webcache2" (or "invalidation" if you want to define a connection group).public InvalidationConnection(java.lang.String tagName)
Equivalent to InvalidationConnection(null, tagName)
.
public InvalidationConnection()
Equivalent to InvalidationConnection(null, "invalidation")
.
protected InvalidationConnection(oracle.net.http.HttpConnection conn)
Method Detail |
---|
public InvalidationResult send(InvalidationMessage msg)
msg
- an InvalidationMessage
objectInvalidationResult
objectInvalidationMessage
, InvalidationResult
public InvalidationResult send(java.lang.String msg)
msg
- invalidation message expressed as an XML document (in compliance with WCSinvalidation.dtd)InvalidationResult
objectInvalidationResult
public void send(InvalidationMessage msg, oracle.net.http.HttpListener lsnr, java.lang.Object callbackArg)
msg
- an InvalidationMessage
objectlsnr
- callback listenercallbackArg
- callback argumentInvalidationMessage
, HttpListener
public void send(java.lang.String msg, oracle.net.http.HttpListener lsnr, java.lang.Object callbackArg)
msg
- invalidation message expressed as an XML document (in compliance with WCSinvalidation.dtd)lsnr
- callback listenercallbackArg
- callback argumentInvalidationMessage
, HttpListener
public static void shutdown()
|
Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache 11g Release 1 (11.1.1) E10665-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |