com.caucho.burlap.client |
Portable client code for using Burlap services. Since this package is
independent of all Resin code, its classes can be copied to a
non-Resin client jar.
RPC Proxy Clients - BurlapProxyFactory
Most application clients will use BurlapProxyFactory to
create stub objects. The stub objects can be called with normal
Java calls. Because the objects are remote, the client application needs
to be able to deal with IOException caused by an unavailable server or
a protocol error.
import com.caucho.burlap.client.BurlapProxyFactory;
...
URL url = new URL("http://localhost:8080/ejb/hello");
HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);
System.out.println("hello: " + hello.hello());
Serialization
Since the Burlap protocol serializes Java objects to XML, the
BurlapSerializerOutput and BurlapSerializerInput
can be used for serialization.
Serialization
OutputStream os = new FileOutputStream("test.xml");
BurlapOutput out = new BurlapSerializerOutput(os);
out.writeObject(obj);
os.close();
Deserialization
InputStream is = new FileInputStream("test.xml");
BurlapInput in = new BurlapSerializerInput(in);
Object obj = in.readObject();
is.close();
MicroBurlapInput and MicroBurlapOutput
These two classes only require classes from Java MicroEdition. So they
can be extracted separately into a burlap-micro.jar. Because of this
restriction and their small size, these two classes
are ideal for limited size devices like mobile phones and PDAs.
|
Java Source File Name | Type | Comment |
BurlapMetaInfoAPI.java | Interface | API retrieving burlap meta information. |
BurlapProtocolException.java | Class | Exception for faults when the fault doesn't return a java exception. |
BurlapProxy.java | Class | Proxy implementation for Burlap clients. |
BurlapProxyFactory.java | Class | Factory for creating Burlap client stubs. |
BurlapProxyResolver.java | Class | Looks up remote objects in the proxy. |
BurlapRemote.java | Class | Encapsulates a remote address when no stub is available, e.g. |
BurlapRuntimeException.java | Class | Wrapper for protocol exceptions thrown in the proxy. |
BurlapServiceException.java | Class | Exception for faults when the fault doesn't return a java exception. |
MicroBurlapInput.java | Class | Input stream for Burlap requests, compatible with microedition
Java. |
MicroBurlapOutput.java | Class | Output stream for Burlap requests, compatible with microedition
Java. |