|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.util.AbstractDataSource
thinkmap.datasource.stream.RemoteDataSource
public class RemoteDataSource
The remote datasource acts as a proxy for another datasource over a network. The other datasource does the actual work of answering requests; all this does is package and stream requests and responses over the network.
| Nested Class Summary | |
|---|---|
protected class |
RemoteDataSource.URLStreamFactory
|
| Field Summary | |
|---|---|
static String |
INITIAL_REQUEST
|
| Constructor Summary | |
|---|---|
RemoteDataSource()
Creates a new RemoteDataSource object. |
|
RemoteDataSource(URL url)
Creates a new RemoteDataSource object. |
|
| Method Summary | |
|---|---|
void |
contextDestroyed(IThinkmapContext itc)
Called when the given context has been destroyed. |
void |
contextInitializing(IThinkmapContext context)
Called when the given context is initializing. |
void |
contextStarting(IThinkmapContext itc)
Called when the given context is starting. |
void |
contextStopping(IThinkmapContext itc)
Called when the given context is stopping. |
IEntityHandler |
createRequest(IEntityHandler callback)
Create a request. |
protected IStreamFactory |
createStreamFactory(IEntityHandler callback)
|
boolean |
getCompressed()
Determine if requests are compressed when possible. |
URL |
getURL()
Get the URL this datasource communicates with. |
void |
setCompatabilityMode(boolean b)
Set compatibility mode on or off. |
void |
setCompressed(boolean b)
Set whether or not the request should be compressed when possible. |
void |
setConfig(ThinkmapConfig config)
|
void |
setStreamFormat(IStreamFormat streamFormat)
Set the stream format this RemoteDataSource uses to serialize requests. |
void |
setURL(URL url)
Set the URL this datasource communicates with. |
| Methods inherited from class thinkmap.datasource.util.AbstractDataSource |
|---|
processCustomRequest, processEntityRequest, processIdRequest, processMetadataRequest, processRelatedRequest, processRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String INITIAL_REQUEST
| Constructor Detail |
|---|
public RemoteDataSource(URL url)
url - URL of the other endpublic RemoteDataSource()
| Method Detail |
|---|
public void setCompatabilityMode(boolean b)
b - true for compatibility modepublic void setStreamFormat(IStreamFormat streamFormat)
streamFormat - stream formatpublic void setCompressed(boolean b)
b - true to compresspublic boolean getCompressed()
public void setURL(URL url)
url - the remote URLpublic URL getURL()
public IEntityHandler createRequest(IEntityHandler callback)
IDataSource
createRequest in interface IDataSourcecreateRequest in class AbstractDataSourcecallback - The IEntityHandler that will recieve the response.
public void setConfig(ThinkmapConfig config)
public void contextInitializing(IThinkmapContext context)
throws Exception
IContextListener
contextInitializing in interface IContextListenercontext - the context that is initializing
Exception - if an error occurs while processing this event.public void contextStarting(IThinkmapContext itc)
IContextListener
contextStarting in interface IContextListeneritc - the context that is startingpublic void contextStopping(IThinkmapContext itc)
IContextListener
contextStopping in interface IContextListeneritc - the context that is startingpublic void contextDestroyed(IThinkmapContext itc)
IContextListener
contextDestroyed in interface IContextListeneritc - the context that is being destroyedprotected IStreamFactory createStreamFactory(IEntityHandler callback)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||