| Modifier and Type | Field and Description |
|---|---|
static String |
NONSECURE_TRANSPORT |
static String |
SECURE_TRANSPORT |
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects to the remote server but does not establish a user session.
|
void |
disconnect()
Disconnect from the server.
|
String |
getHost() |
int |
getPort() |
<T> T |
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.
|
<T> T |
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() |
public static final String NONSECURE_TRANSPORT
public static final String SECURE_TRANSPORT
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 <T> T remoteInvoke(RhqManager manager, Method method, Class<T> expectedReturnType, Object... parameters) throws Throwable
Throwablepublic 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.public void logout()
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)
public String getServerVersion()
public String getServerBuildNumber()
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.