|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryPathUtilityMBean
The RepositoryPathUtilityMBean provides utility methods to construct repository node paths and server tuples.
The ObjectName for this MBean is "WebSphere:feature=collectiveController,type=RepositoryPathUtility,name=RepositoryPathUtility".
A server tuple is defined as (hostName,wlpUserDir,serverName). The host name is always in lower case. The wlpUserDir is not encoded. The elements of the tuple can always be safely parsed as follows:
String hostName = tuple.substring(0, tuple.indexOf(',')); String wlpUserDir = tuple.substring(tuple.indexOf(',') + 1, tuple.lastIndexOf(',')); String serverName = tuple.substring(tuple.lastIndexOf(',') + 1);
Field Summary | |
---|---|
static java.lang.String |
OBJECT_NAME
A String representing the ObjectName that this MBean maps to. |
Method Summary | |
---|---|
java.lang.String |
buildHostRepositoryPath(java.lang.String hostName)
Builds the host's path in the repository. |
java.lang.String |
buildServerRepositoryPath(java.lang.String hostName,
java.lang.String urlEncodedUserDir,
java.lang.String serverName)
Builds the server's path in the repository. |
java.lang.String |
buildServerTuple(java.lang.String hostName,
java.lang.String wlpUserDir,
java.lang.String serverName)
Builds the server tuple from the given host name, wlp user directory and server name. |
java.lang.String |
getServerTuple(java.lang.String path)
Extracts the server tuple from the given path. |
java.lang.String |
getURLEncodedPath(java.lang.String path)
Encodes an OS file system path with a UTF-8 URL encoding. |
Field Detail |
---|
static final java.lang.String OBJECT_NAME
ObjectName
that this MBean maps to.
Method Detail |
---|
java.lang.String getURLEncodedPath(java.lang.String path)
The encoded form can be used in the repository as a path element.
Windows drive-letters are always converted to their upper-case form to ensure consistency.
e.g. RepositoryPathUtility.getURLEncodedPath("c:\\wlp\\usr\\")
will result in: C%3A%2Fwlp%2Fusr
Note that URL-style prefixing, such as file:// is stripped.
e.g. RepositoryPathUtility.getURLEncodedPath("file:/c:/wlp/usr")
will result in: C%3A%2Fwlp%2Fusr
path
- The OS filesystem path to encode. Must not be null
.
java.lang.String buildHostRepositoryPath(java.lang.String hostName)
The host name will automatically converted to lower-case.
hostName
- The host name. Must not be null
or empty.
java.lang.String buildServerRepositoryPath(java.lang.String hostName, java.lang.String urlEncodedUserDir, java.lang.String serverName)
A server is uniquely identified by its host name, its user dir, and its server name.
The host name will automatically converted to lower-case.
hostName
- The host name for the server. Must not be null
or empty.urlEncodedUserDir
- The URL encoded canonical path for the user directory of server. Must not be null
or empty.serverName
- The name of the server. Must not be null
or empty.
getURLEncodedPath(String)
java.lang.String getServerTuple(java.lang.String path) throws java.lang.IllegalArgumentException
path
- A server repository path. Must not be null
or empty.
null if the path is not a server
repository path
java.lang.IllegalArgumentException
- If the path is not a server repository
pathjava.lang.String buildServerTuple(java.lang.String hostName, java.lang.String wlpUserDir, java.lang.String serverName)
hostName
- The host name for the server. Must not be null
or empty.wlpUserDir
- The canonical path for the user directory of server. Must not be null
or empty.serverName
- The name of the server. Must not be null
or empty.
getURLEncodedPath(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |