|
ADK CVS | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttryllian.webservices.gateway.HabitatGateway
This class is a gateway: subclass it to create a class that behaves like a web service but it can forward calls to the webservice as an agent message via a StandaloneMessenger. It is designed to run using Axis in Tomcat, but may very well work in other servlet containers.
Take the following steps to use this class as a webservice:
The deployment descriptor should look somewhat like this:
This class currently uses a property file for it's settings, this can probably be moved to a web.xml file...
SimpleTupleGateway,
tryllian.webservices.gateway.examples.Temperatureconverter| Constructor Summary | |
HabitatGateway()
Create a new gateway - default constructor - needed to run this class as a webservice. |
|
HabitatGateway(tryllian.are.messenger.standalone.StandaloneMessengerProperties props)
Create a new gateway. |
|
| Method Summary | |
tryllian.are.messenger.MessageFactory |
getMessageFactory()
Get the message factory. |
void |
handleMessage(Message msg)
Handle an incoming message |
void |
localDeliveryFailed(tryllian.are.messenger.DeliveryFailure details)
Called whenever an envelope could not be delivered for local reasons |
void |
remoteDeliveryFailed(tryllian.are.messenger.DeliveryFailure details)
Called whenever an envelope could not be delivered for remote reasons |
Message |
sendAndReceiveMessage(OutgoingMessage msg,
long timeOut)
Sends a message and waits for the answer (blocking call). |
void |
sendMessage(OutgoingMessage msg)
Sends a message - this version does not wait for an answer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HabitatGateway()
throws java.io.IOException,
java.security.GeneralSecurityException
public HabitatGateway(tryllian.are.messenger.standalone.StandaloneMessengerProperties props)
throws java.io.IOException,
java.security.GeneralSecurityException
| Method Detail |
public tryllian.are.messenger.MessageFactory getMessageFactory()
public void sendMessage(OutgoingMessage msg)
public Message sendAndReceiveMessage(OutgoingMessage msg,
long timeOut)
timeOut - timeout in milliseconds, -1 means no timeout.public void handleMessage(Message msg)
handleMessage in interface tryllian.are.messenger.MessageReceiverpublic void localDeliveryFailed(tryllian.are.messenger.DeliveryFailure details)
localDeliveryFailed in interface tryllian.are.messenger.DeliveryFailureHandlerpublic void remoteDeliveryFailed(tryllian.are.messenger.DeliveryFailure details)
remoteDeliveryFailed in interface tryllian.are.messenger.DeliveryFailureHandler
|
Copyright 2005, Tryllian Solutions B.V. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||