|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.net.remoting.RemotingClient
public class RemotingClient
Client interface for remoting calls.
Nested Class Summary | |
---|---|
static class |
RemotingClient.RemotingWorker
Worker class that is used for asynchronous remoting calls. |
Field Summary | |
---|---|
static int |
DEFAULT_TIMEOUT
Default timeout to use. |
protected Map<String,RemotingHeader> |
headers
Headers to send to the server. |
protected static Logger |
log
Logger |
protected static ThreadPool |
threadPool
Thread pool to use for asynchronous requests. |
Constructor Summary | |
---|---|
RemotingClient()
Dummy constructor used by the spring configuration. |
|
RemotingClient(String url)
Create new remoting client for the given url. |
|
RemotingClient(String url,
org.apache.commons.httpclient.HttpConnectionManager mgr)
Create new remoting client in the given connection manager. |
|
RemotingClient(String url,
int timeout)
Create new remoting client for the given url and given timeout. |
|
RemotingClient(String url,
int timeout,
org.apache.commons.httpclient.HttpConnectionManager mgr)
Create new remoting client with the given connection manager and timeout. |
Method Summary | |
---|---|
void |
addHeader(String name,
boolean required,
Object value)
Send an additional header to the server. |
Object |
invokeMethod(String method,
Object[] params)
Invoke a method synchronously on the remoting server. |
void |
invokeMethod(String method,
Object[] methodParams,
IRemotingCallback callback)
Invoke a method asynchronously on the remoting server. |
protected void |
processHeaders(org.apache.mina.core.buffer.IoBuffer in)
Process any headers sent in the response. |
void |
removeHeader(String name)
Stop sending a given header. |
void |
resetCredentials()
Stop sending authentication data. |
void |
setCredentials(String userid,
String password)
Send authentication data with each remoting request. |
void |
setThreadPool(ThreadPool threadPool)
Set the thread pool to use for asynchronous requests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
public static final int DEFAULT_TIMEOUT
protected Map<String,RemotingHeader> headers
protected static ThreadPool threadPool
Constructor Detail |
---|
public RemotingClient()
public RemotingClient(String url)
url
- URL to connect topublic RemotingClient(String url, int timeout)
url
- URL to connect totimeout
- Timeout for one request in millisecondspublic RemotingClient(String url, org.apache.commons.httpclient.HttpConnectionManager mgr)
url
- URL to connect tomgr
- The connection manager to usepublic RemotingClient(String url, int timeout, org.apache.commons.httpclient.HttpConnectionManager mgr)
url
- URL to connect totimeout
- Timeout for one request in millisecondsmgr
- The connection manager to useMethod Detail |
---|
public void setThreadPool(ThreadPool threadPool)
threadPool
- The thread poolprotected void processHeaders(org.apache.mina.core.buffer.IoBuffer in)
in
- Byte buffer with response datapublic void setCredentials(String userid, String password)
userid
- User identifierpassword
- Passwordpublic void resetCredentials()
public void addHeader(String name, boolean required, Object value)
name
- Header namerequired
- Header required?value
- Header bodypublic void removeHeader(String name)
name
- Header namepublic Object invokeMethod(String method, Object[] params)
method
- Method nameparams
- Parameters passed to method
public void invokeMethod(String method, Object[] methodParams, IRemotingCallback callback)
method
- Method namemethodParams
- Parameters passed to methodcallback
- Callback
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |