|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rhq.enterprise.clientapi.RemoteClient
public class RemoteClient
A remote access client that provides transparent servlet-based proxies to an RHQ Server.
| Field Summary | |
|---|---|
static String |
NONSECURE_TRANSPORT
|
static String |
SECURE_TRANSPORT
|
| Constructor Summary | |
|---|---|
RemoteClient(String host,
int port)
Creates a client that will communicate with the server running on the given host listening on the given port. |
|
RemoteClient(String transport,
String host,
int port)
Creates a client that will communicate with the server running on the given host listening on the given port over the given transport. |
|
RemoteClient(String transport,
String host,
int port,
String subsystem)
|
|
| Method Summary | ||
|---|---|---|
void |
connect()
Connects to the remote server but does not establish a user session. |
|
void |
disconnect()
Disconnect from the server. |
|
String |
getHost()
|
|
int |
getPort()
|
|
|
getProxy(Class<T> remoteApiIface)
|
|
URI |
getRemoteURI()
|
|
Map<RhqManager,Object> |
getScriptingAPI()
Returns the map of all remote managers running in the server that this client can talk to. |
|
String |
getServerBuildNumber()
If the client is connected, this is build number of the server that the client is talking to. |
|
String |
getServerVersion()
If the client is connected, this is version of the server that the client is talking to. |
|
org.rhq.core.domain.auth.Subject |
getSubject()
Returns the information on the user that is logged in. |
|
String |
getTransport()
|
|
protected String |
guessTransport(int port)
|
|
boolean |
isConnected()
Returns true if and only if this client successfully connected
to the remote server. |
|
boolean |
isLoggedIn()
Returns true if and only if this client successfully connected
to the remote server and the user successfully logged in. |
|
org.rhq.core.domain.auth.Subject |
login(String user,
String password)
Connects to the remote server and logs in with the given credentials. |
|
void |
logout()
Logs out from the server and disconnects this client. |
|
|
remoteInvoke(RhqManager manager,
Method method,
Class<T> expectedReturnType,
Object... parameters)
|
|
void |
setTransport(String transport)
Sets the underlying transport to use to communicate with the server. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NONSECURE_TRANSPORT
public static final String SECURE_TRANSPORT
| Constructor Detail |
|---|
public RemoteClient(String host,
int port)
login(String, String) for that.
host - port -
public RemoteClient(String transport,
String host,
int port)
login(String, String) for that.
transport - valid values are "servlet" and "sslservlet" - if null,
sslservlet will be used for ports that end with "443", servlet otherwisehost - port -
public RemoteClient(String transport,
String host,
int port,
String subsystem)
| Method Detail |
|---|
public <T> T remoteInvoke(RhqManager manager,
Method method,
Class<T> expectedReturnType,
Object... parameters)
throws Throwable
Throwable
public org.rhq.core.domain.auth.Subject login(String user,
String password)
throws Exception
isLoggedIn() will be true
and getSubject() will return the subject that this method returns.
login in interface RhqFacadeuser - password -
Exception - if failed to connect to the server or log inpublic void logout()
logout in interface RhqFacade
public void connect()
throws Exception
isConnected() will be true
and getSubject() will return the subject that this method returns.
Exception - if failed to connect to the server or log inpublic void disconnect()
public boolean isLoggedIn()
true if and only if this client successfully connected
to the remote server and the user successfully logged in.
isLoggedIn in interface RhqFacadepublic boolean isConnected()
true if and only if this client successfully connected
to the remote server.
public org.rhq.core.domain.auth.Subject getSubject()
null if the user never logged in successfully.
getSubject in interface RhqFacadenullpublic URI getRemoteURI()
public String getHost()
public int getPort()
public String getTransport()
protected String guessTransport(int port)
public void setTransport(String transport)
null, then the transport to be used will
be set appropriately for the getPort() (e.g. a secure transport
will be used for ports that end with 443, a non-secure transport will be
used for all other ports).
transport - public Map<RhqManager,Object> getScriptingAPI()
getScriptingAPI in interface RhqFacadepublic <T> T getProxy(Class<T> remoteApiIface)
getProxy in interface RhqFacadepublic String toString()
toString in class Objectpublic String getServerVersion()
public String getServerBuildNumber()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||