com.ibm.websphere.collective.repository
Interface RepositoryPathUtilityMBean
- public interface RepositoryPathUtilityMBean
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
Modifier and Type | Field and Description |
---|---|
|
OBJECT_NAME
A String representing the
ObjectName that this MBean maps to.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
buildHostRepositoryPath(java.lang.String hostName)
Builds the host's path in the repository.
|
|
buildServerRepositoryPath(java.lang.String hostName,java.lang.String urlEncodedUserDir,java.lang.String serverName)
Builds the server's path in the repository.
|
|
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.
|
|
getServerTuple(java.lang.String path)
Extracts the server tuple from the given path.
|
|
getURLEncodedPath(java.lang.String path)
Encodes an OS file system path with a UTF-8 URL encoding.
|
Field Detail
OBJECT_NAME
- static final java.lang.String OBJECT_NAME
Method Detail
getURLEncodedPath
- 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
. buildHostRepositoryPath
- 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. buildServerRepositoryPath
- 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. getServerTuple
- 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
path buildServerTuple
- java.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.
ObjectName
that this MBean maps to.