|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.BaseObject
This class is the base object for the context-aware infrastructure. It is able to poll and subscribe to other components and can be polled and subscribed to by other components. It also can generate and handle RPC-style requests. It consists of 2 main objects, the CommunicationsObject and ParserObject. It also maintains a list of subscribers and a list of handlers.
CommunicationsObject
,
ParserObject
,
Handler
Field Summary | |
static java.lang.String |
BASEOBJECT_TYPE
The tag for the type of this object |
CommunicationsObject |
communications
Object to handle communications between components |
static boolean |
DEBUG
Debug flag. |
static int |
DISABLE_PORT
Disables the communications |
DiscovererDescription |
discoverer
The description of the discoverer that the base object has found |
static int |
EXIT_OK
Indicates that the exit condition is normal |
GenericFrame |
gFrame
|
Handlers |
handlers
Object to keep track of context widget handlers |
static java.lang.String |
ID
Tag for id of this component |
ParserObject |
parser
Object to handle the encoding and decoding of communications |
static java.lang.String |
PING
Tag for a ping |
static java.lang.String |
PING_REPLY
Tag for a ping reply |
static java.lang.String |
QUERY_DESCRIPTION
Tag for getting the description |
static java.lang.String |
QUERY_DESCRIPTION_REPLY
Tag for reply to a query_description |
AsyncServiceHandlers |
serviceHandlers
Object to keep track of asynchronous service handlers |
Constructor Summary | |
BaseObject()
Basic constructor that creates a CommunicationsObject, ParserObject and Handlers object. |
|
BaseObject(int localServerPort)
Constructor that just creates a CommunicationsObject with the given port and ParserObject. |
|
BaseObject(int localServerPort,
java.lang.String protocolHandlerClass)
Constructor that just creates a CommunicationsObject with the given port and protocol handler class, and ParserObject. |
|
BaseObject(java.lang.String protocolHandlerClass)
Constructor that just creates a CommunicationsObject with the given protocol handler class, and a ParserObject. |
|
BaseObject(java.lang.String communicationClientClass,
java.lang.String communicationServerClass,
int localServerPort,
java.lang.String encoderClass,
java.lang.String decoderClass)
Basic constructor that creates a CommunicationsObject with the given port and protocol, and creates a ParserObject with the given encoder and decoder. |
|
BaseObject(java.lang.String communicationClientClass,
java.lang.String communicationServerClass,
int localServerPort,
java.lang.String encoderClass,
java.lang.String decoderClass,
int threadPoolNumber)
Basic constructor that creates a CommunicationsObject with the given port and protocol, and creates a ParserObject with the given encoder and decoder. |
Method Summary | |
void |
activateDisplay()
Activate the display |
DataObject |
askInterpreter(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
Attributes data)
This method asks an interpreter to interpret some data. |
void |
deactivateDisplay()
Deactivate the display |
static void |
debugprintln(boolean DEBUG_flag,
java.lang.Object s)
Print a message if the DEBUG mode is active |
DataObject |
decodeData(java.io.Reader communicationData)
Stub method that decodes the given string using ParserObject |
java.util.Vector |
discovererQuery(AbstractQueryItem query)
This method allows to send a query to the discoverer. |
protected DataObject |
discovererQuery(DataObject data)
This method allows to send a query to the discoverer containing the description of the context component the object would like to know. |
Error |
discovererRegistration()
This method is used to send the component description to the discoverer. |
Error |
discovererRegistration(Lease registrationLease)
This method is used to send the component description to the discoverer. |
protected DataObject |
discovererSendSubscription(Handler handler,
DiscovererSubscriber discoSub)
to improve |
void |
discovererSubscribe(Handler handler,
DiscovererSubscriber discoSub)
This method is used to subscribe to the discoverer. |
DataObject |
discovererSubscriptionNotification(DataObject data)
|
Error |
discovererUnregistration()
This method allows to unregister from the discoverer |
Error |
discovererUpdate()
This method allows to send a message to the discoverer to update its own description stored in the discoverer. |
java.lang.String |
encodeData(DataObject communicationData)
Stub method that encodes the given string using ParserObject |
DataObject |
executeAsynchronousWidgetService(AsyncServiceHandler handler,
java.lang.String serviceHost,
int servicePort,
java.lang.String serviceId,
java.lang.String service,
java.lang.String function,
Attributes input,
java.lang.String requestTag)
This method requests that a widget execute an asynchronous service |
DataObject |
executeSynchronousWidgetService(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
java.lang.String service,
java.lang.String function,
Attributes input)
This method requests that a widget execute a synchronous service |
Error |
findDiscoverer()
This method allows to find a discoverer. |
Error |
findDiscoverer(boolean registration)
This method allows to find a discoverer. |
Error |
findDiscoverer(boolean registration,
Lease registrationLease,
boolean automaticRenewal)
This method allows to find a discoverer. |
ComponentDescription |
getComponentDescription()
|
DataObject |
getDescription()
Returns the common description of the component. |
java.lang.String |
getHostAddress()
This method gets the address of the machine this component is running on. |
java.lang.String |
getHostName()
This method gets the name of the machine this component is running on. |
java.lang.String |
getId()
This method returns the id of the class that subclass this object, for use in sending messages. |
static java.lang.String |
getId(java.lang.String className,
int port)
Returns a uniq id constructed as classname_hostname_port_givenUserLocation, or if there is an error, returns the user location given by the user. |
Lease |
getLease()
This method allows to specify a lease used to register the discoverer. |
java.lang.String |
getListOfHandlers()
Returns the list of handlers this object made. |
java.lang.String |
getLocationAddress()
Returns the location address |
int |
getPort()
|
java.lang.String |
getType()
Returns the type of the object This method should be overridden |
DataObject |
getUserDescription()
Returns the added description of the component That method should be overriden. |
java.lang.String |
getVersion()
This method returns the version number of this object. |
DataObject |
getVersion(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId)
This method gets the version of the given component (remoteHostname, widget, interpreter). |
DataObject |
getWidgetAttributes(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId)
This method gets the attributes of the given widget |
DataObject |
getWidgetCallbacks(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId)
This method gets the callbacks of the given widget |
DataObject |
getWidgetConstantAttributes(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId)
This method gets the attributes of the given widget |
DataObject |
getWidgetServices(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId)
This method gets the services of the given widget |
void |
handleIndependentReply(IndependentCommunication independentCommunication)
This method is called after the independentUserRequest has been called. |
void |
independentUserRequest(IndependentCommunication request)
This method is used to send a message through a threaded communication. |
protected DataObject |
leaseEndNotified(DataObject data)
This method sends a lease end confirmation if necessary. |
void |
pingComponent(IndependentCommunication independentCommunication)
|
DataObject |
pingComponent(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
boolean independentCom)
This method pings a component (widget,remoteHostname, or interpreter) to make sure that it is functioning ok. |
DataObject |
pollWidget(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId,
Attributes attributes)
This method allows a component to poll a remote widget for its attribute values. |
void |
println(java.lang.String s)
Print a string, on the displayed frame if it is activated or on the default output stream. |
DataObject |
putDataInWidget(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId,
java.lang.String callback,
Attributes attributes)
This method allows a component to put context data in a remote widget. |
DataObject |
queryVersion(DataObject query)
This method returns the version number of this component. |
void |
quit()
This method should be called when the object is going to exit under normal conditions. |
DataObject |
retrieveDataFrom(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
Retrieval retrieval)
This method allows a component to retrieve data from other components. |
DataObject |
retrieveDataFrom(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
java.lang.String myId,
Retrieval retrieval)
This method allows a component to retrieve data from other components. |
DataObject |
returnPing(DataObject ping)
This method returns an error message as an answer to a ping. |
DataObject |
runComponentMethod(java.lang.String remoteHost,
int remotePort,
java.lang.String remoteId,
java.lang.String methodName,
Attributes parameters,
Attributes attributes)
This method asks an component to run some non-standard method. |
DataObject |
runMethod(java.lang.String methodType,
DataObject data)
This method handles both the system-defined, callbacks and user-defined RPCs. |
DataObject |
runUserMethod(DataObject data)
This is an empty method that should be overridden by the object that extends this class. |
DataObject |
serviceResult(DataObject result)
This method handles the results of an asynchronous service request. |
void |
setAllDebug(boolean baseObjectDebug,
boolean communicationDebug,
boolean componentDebug)
Set the CTK classes in the DEBUG status |
DataObject |
setDiscoverer(DataObject data)
This method handles the lookup response from the discoverer. |
void |
setDisplay()
Create the display and activate it |
void |
setDisplay(GenericFrame frame)
|
void |
setDisplayName(java.lang.String objName)
Set the title displayed on the frame |
void |
setDisplayTitle(java.lang.String title)
Set the title of the frame |
void |
setId(java.lang.String id)
This method sets the id of classes that subclass this object, for use in sending messages. |
void |
setLease(Lease lease)
Set the lease used to register the discoverer |
void |
setLocationAddress(java.lang.String location)
Sets the location address (structured as for example GT/CRB/Floor1/Hall2/room4 |
void |
setVersion(java.lang.String version)
This method sets the version number of this object. |
Error |
subscribeTo(Handler handler,
java.lang.String remoteId,
java.lang.String remoteHost,
int remotePort,
ClientSideSubscriber subscriber)
This method allows a component to subscribe to changes in other components. |
Error |
unsubscribeFrom(java.lang.String subscriptionId)
This method allows a component to unsubscribe from another component. |
DataObject |
updateAndPollWidget(java.lang.String widgetHost,
int widgetPort,
java.lang.String widgetId,
Attributes attributes)
This method allows a component to force a remote widget to update its data and return it. |
DataObject |
userCallback(DataObject data)
This method is called when a callback message is received. |
DataObject |
userRequest(DataObject data,
java.lang.String requestType)
Deprecated. |
DataObject |
userRequest(DataObject data,
java.lang.String requestType,
java.lang.String remoteHostname)
Deprecated. |
DataObject |
userRequest(DataObject data,
java.lang.String requestType,
java.lang.String remoteHostname,
int remotePort)
Method that submits a user request for polling/subscription. |
DataObject |
userRequest(RequestObject request)
Sends a message to a remote component |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean DEBUG
public static final int EXIT_OK
public static final int DISABLE_PORT
public static final java.lang.String ID
public static final java.lang.String PING
public static final java.lang.String PING_REPLY
public static final java.lang.String QUERY_DESCRIPTION
public static final java.lang.String QUERY_DESCRIPTION_REPLY
public static final java.lang.String BASEOBJECT_TYPE
public CommunicationsObject communications
CommunicationsObject
public ParserObject parser
ParserObject
public Handlers handlers
Handlers
,
Handler
public AsyncServiceHandlers serviceHandlers
AsyncServiceHandlers
,
AsyncServiceHandler
public GenericFrame gFrame
public DiscovererDescription discoverer
Discoverer
Constructor Detail |
public BaseObject(java.lang.String communicationClientClass, java.lang.String communicationServerClass, int localServerPort, java.lang.String encoderClass, java.lang.String decoderClass, int threadPoolNumber)
communicationClientClass
- Class to use for client communicationscommunicationServerClass
- Class to use for server communicationslocalServerPort
- Port to use for server communicationsencoderClass
- Class to use for communications encodingdecoderClass
- Class to use for communications decodingthreadPoolNumber
- The number of client threads in the clients poolCommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
public BaseObject(java.lang.String communicationClientClass, java.lang.String communicationServerClass, int localServerPort, java.lang.String encoderClass, java.lang.String decoderClass)
communicationClientClass
- Class to use for client communicationscommunicationServerClass
- Class to use for server communicationslocalServerPort
- Port to use for server communicationsencoderClass
- Class to use for communications encodingdecoderClass
- Class to use for communications decodingCommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
public BaseObject()
CommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
public BaseObject(int localServerPort)
localServerPort
- Port number to communicate onCommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
public BaseObject(java.lang.String protocolHandlerClass)
protocolHandlerClass
- Protocol handler class to communicate withCommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
public BaseObject(int localServerPort, java.lang.String protocolHandlerClass)
localServerPort
- Port number to communicate onprotocolHandlerClass
- Protocol handler class name to communicate withCommunicationsObject
,
CommunicationsObject.start()
,
ParserObject
,
Handlers
Method Detail |
public DataObject decodeData(java.io.Reader communicationData) throws DecodeException, InvalidDecoderException
decodeData
in interface MessageHandler
communicationData
- String to be decoded
DecodeException
- thrown if the parser can't decode the given string
InvalidDecoderException
- thrown if the parser can't create the necessary decoderParserObject.decodeData(java.io.Reader)
public java.lang.String encodeData(DataObject communicationData) throws EncodeException, InvalidEncoderException
encodeData
in interface MessageHandler
communicationData
- String to be decoded
EncodeException
- thrown if the parser can't encode the given string
InvalidEncoderException
- thrown if the parser can't create the necessary encoderParserObject.encodeData(context.arch.comm.DataObject)
public DataObject userRequest(DataObject data, java.lang.String requestType) throws EncodeException, InvalidProtocolException, ProtocolException, DecodeException, InvalidDecoderException, InvalidEncoderException, java.io.IOException
userRequest
in interface CommunicationsHandler
data
- DataObject that contains the requestrequestType
- RPC tag that indicates the type of request
EncodeException
- when the encoding can't be completed successfully
DecodeException
- when the decoding can't be completed successfully
InvalidEncoderException
- when the encoder can't be created
InvalidDecoderException
- when the decoder can't be created
ProtocolException
- when the request can't be sent successfully
InvalidProtocolException
- when the request can't be sent successfully due to invalid protocol use
java.io.IOException
public DataObject userRequest(RequestObject request) throws EncodeException, InvalidProtocolException, ProtocolException, DecodeException, InvalidDecoderException, InvalidEncoderException, java.io.IOException
userRequest
in interface CommunicationsHandler
request
- The RequestObject that contains all information about the
remote component and the data to send
InvalidProtocolException
- when the request can't be sent successfully due to invalid protocol use
DecodeException
- when the decoding can't be completed successfully
EncodeException
- when the encoding can't be completed successfully
ProtocolException
- when the request can't be sent successfully
InvalidEncoderException
- when the encoder can't be created
InvalidDecoderException
- when the decoder can't be created
java.io.IOException
public DataObject userRequest(DataObject data, java.lang.String requestType, java.lang.String remoteHostname) throws EncodeException, InvalidProtocolException, ProtocolException, DecodeException, InvalidDecoderException, InvalidEncoderException, java.io.IOException
userRequest
in interface CommunicationsHandler
data
- DataObject that contains the requestrequestType
- RPC tag that indicates the type of requestremoteHostname
- Hostname of the component the request is being sent to
EncodeException
- when the encoding can't be completed successfully
DecodeException
- when the decoding can't be completed successfully
InvalidEncoderException
- when the encoder can't be created
InvalidDecoderException
- when the decoder can't be created
ProtocolException
- when the request can't be sent successfully
InvalidProtocolException
- when the request can't be sent successfully due to invalid protocol use
java.io.IOException
public DataObject userRequest(DataObject data, java.lang.String requestType, java.lang.String remoteHostname, int remotePort) throws EncodeException, ProtocolException, InvalidProtocolException, DecodeException, InvalidDecoderException, InvalidEncoderException, java.io.IOException
userRequest
in interface CommunicationsHandler
data
- DataObject that contains the requestrequestType
- RPC tag that indicates the type of requestremoteHostname
- Hostname of the component the request is being sent toremotePort
- Port number of the component the request is being sent to
EncodeException
- when the encoding can't be completed successfully
DecodeException
- when the decoding can't be completed successfully
InvalidEncoderException
- when the encoder can't be created
InvalidDecoderException
- when the decoder can't be created
ProtocolException
- when the request can't be sent successfully
InvalidProtocolException
- when the request can't be sent successfully due to invalid protocol use
java.io.IOException
public void independentUserRequest(IndependentCommunication request) throws EncodeException, InvalidEncoderException
independentUserRequest
in interface CommunicationsHandler
request
- The IndependentCommunication object that contain the RequestObject,
and will contain after the communication the reply dataObject and the vector of exception
EncodeException
InvalidEncoderException
handleIndependentReply(context.arch.comm.clients.IndependentCommunication)
,
IndependentCommunication
,
context.arch.comm.clients.IndependentCommunications
,
context.arch.util.RequesObject
public void handleIndependentReply(IndependentCommunication independentCommunication)
handleIndependentReply
in interface MessageHandler
ClientsPool
,
Client
,
context.arch.util.RequestObject
,
DataObject
public Error subscribeTo(Handler handler, java.lang.String remoteId, java.lang.String remoteHost, int remotePort, ClientSideSubscriber subscriber)
handler
- Object that handles context widget callbacksremoteId
- Id of the context widget being subscribed toremoteHost
- Hostname of the widget being subscribed toremotePort
- Port number of the widget being subscribed tosubscriber
- Subscriber object holding the subscription info
Handlers
,
Handlers.addHandler(context.arch.handler.HandlerInfo)
,
userRequest(context.arch.comm.DataObject, String, String, int)
public Error unsubscribeFrom(java.lang.String subscriptionId)
Handlers
,
Handlers.removeHandler(context.arch.handler.HandlerInfo)
,
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject pollWidget(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId, Attributes attributes)
widgetHost
- Hostname of the context widget being polledwidgetPort
- Port number of the context widget being polledwidgetId
- Id of the context widget being polledattributes
- Attributes being requested
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject updateAndPollWidget(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId, Attributes attributes)
widgetHost
- Hostname of the context widget being polledwidgetPort
- Port number of the context widget being polledwidgetId
- Id of the context widget being polledattributes
- Attributes being requested
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject putDataInWidget(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId, java.lang.String callback, Attributes attributes)
widgetHost
- Hostname of the context widget to usewidgetPort
- Port number of the context widget to usewidgetId
- Id of the context widget to usecallback
- Callback of the context widget to associate the data withattributes
- AttributeNameValues to put in the widget
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject getVersion(java.lang.String remoteHost, int remotePort, java.lang.String remoteId)
remoteHost
- Hostname of the component being queriedremotePort
- Port number of the component being queriedremoteId
- Id of the component being queried
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject getWidgetCallbacks(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId)
widgetHost
- Hostname of the widget being queriedwidgetPort
- Port number of the widget being queriedwidgetId
- Id of the widget being queried
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject getWidgetServices(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId)
widgetHost
- Hostname of the widget being queriedwidgetPort
- Port number of the widget being queriedwidgetId
- Id of the widget being queried
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject getWidgetAttributes(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId)
widgetHost
- Hostname of the widget being queriedwidgetPort
- Port number of the widget being queriedwidgetId
- Id of the widget being queried
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject getWidgetConstantAttributes(java.lang.String widgetHost, int widgetPort, java.lang.String widgetId)
widgetHost
- Hostname of the widget being queriedwidgetPort
- Port number of the widget being queriedwidgetId
- Id of the widget being queried
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject retrieveDataFrom(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, Retrieval retrieval)
remoteHost
- Hostname of the component being asked for dataremotePort
- Port number of the component being asked for dataremoteId
- Id of the component being asked for dataretrieval
- Description of data to retrieve with any conditions
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject retrieveDataFrom(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, java.lang.String myId, Retrieval retrieval)
remoteHost
- Hostname of the component being asked for dataremotePort
- Port number of the component being asked for dataremoteId
- Id of the component being asked for datamyId
- Id of the "user" trying to access the dataretrieval
- Description of data to retrieve with any conditions
userRequest(context.arch.comm.DataObject, String, String, int)
public DataObject askInterpreter(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, Attributes data)
remoteHost
- Hostname of the component being asked for dataremotePort
- Port number of the component being asked for dataremoteId
- Id of the component being asked for datadata
- AttributeNameValues object containing the data to be interpreted
public DataObject runComponentMethod(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, java.lang.String methodName, Attributes parameters, Attributes attributes)
remoteHost
- Hostname of the componentremotePort
- Port number of the componentremoteId
- Id of the componentmethodName
- Name of the method to runparameters
- AttributeNameValues object that is parameters with valuesattributes
- Attributes object that is parameters with values
public DataObject executeAsynchronousWidgetService(AsyncServiceHandler handler, java.lang.String serviceHost, int servicePort, java.lang.String serviceId, java.lang.String service, java.lang.String function, Attributes input, java.lang.String requestTag)
executeAsynchronousWidgetService
in interface CommunicationsHandler
handler
- Handler to handle the results of the serviceserviceHost
- Hostname of the widget with the serviceservicePort
- Port number of the widget with the serviceserviceId
- Id of the widget with the serviceservice
- Name of the widget service to runfunction
- Name of the particular service function to runinput
- AttributeNameValues object to use to execute the servicerequestTag
- Unique tag provided by caller to identify result
public DataObject executeSynchronousWidgetService(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, java.lang.String service, java.lang.String function, Attributes input)
executeSynchronousWidgetService
in interface CommunicationsHandler
remoteHost
- Hostname of the widgetremotePort
- Port number of the widgetremoteId
- Id of the widgetservice
- Name of the widget service to runfunction
- Name of the particular service function to runinput
- AttributeNameValues object to use to execute the service
public DataObject pingComponent(java.lang.String remoteHost, int remotePort, java.lang.String remoteId, boolean independentCom)
remoteHost
- Hostname of the component being asked for dataremotePort
- Port number of the component being asked for dataremoteId
- Id of the component being asked for data
public void pingComponent(IndependentCommunication independentCommunication)
public void quit()
CommunicationsObject.quit()
public DataObject runUserMethod(DataObject data) throws InvalidMethodException, MethodException
data
- DataObject containing data for user-defined RPC
InvalidMethodException
- thrown if specified RPC couldn't be found
MethodException
- thrown if specified RPC had an errorrunMethod(String, DataObject)
public DataObject runMethod(java.lang.String methodType, DataObject data) throws InvalidMethodException, MethodException
runMethod
in interface MessageHandler
methodType
- Name of method to rundata
- DataObject containing data for the method call
InvalidMethodException
- thrown if specified RPC couldn't be found
MethodException
- thrown if specified RPC had an erroruserCallback(context.arch.comm.DataObject)
,
runUserMethod(context.arch.comm.DataObject)
,
queryVersion(context.arch.comm.DataObject)
,
setDiscoverer(context.arch.comm.DataObject)
public DataObject userCallback(DataObject data)
data
- DataObject containing the callback request
Handlers.getHandler(String)
,
Handler.handle(String, context.arch.comm.DataObject)
public java.lang.String getListOfHandlers()
public DataObject queryVersion(DataObject query)
query
- DataObject containing the query
public DataObject returnPing(DataObject ping)
ping
- DataObject containing the ping request
public DataObject serviceResult(DataObject result)
result
- DataObject containing the results of the aysnchronous service request
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- of the objectpublic void setId(java.lang.String id)
id
- ID of the classpublic java.lang.String getId()
public static java.lang.String getId(java.lang.String className, int port)
className
- The classname of the objectport
- The port of the object
public java.lang.String getType()
public java.lang.String getHostAddress()
public java.lang.String getHostName()
public int getPort()
public DataObject setDiscoverer(DataObject data)
DiscovererDescription
public Error discovererRegistration()
ComponentDescription
public Error discovererRegistration(Lease registrationLease)
ComponentDescription
public ComponentDescription getComponentDescription()
public DataObject getDescription()
ComponentDescription
,
getUserDescription()
public void setLocationAddress(java.lang.String location)
location
- The location addresspublic java.lang.String getLocationAddress()
public DataObject getUserDescription()
Discoverer
public Error findDiscoverer()
public Error findDiscoverer(boolean registration)
registration
- True if the component registers the discoverer
Lease
public Error findDiscoverer(boolean registration, Lease registrationLease, boolean automaticRenewal)
setDiscoverer(context.arch.comm.DataObject)
,
Discoverer
public Error discovererUpdate()
Discoverer
public void discovererSubscribe(Handler handler, DiscovererSubscriber discoSub)
protected DataObject discovererSendSubscription(Handler handler, DiscovererSubscriber discoSub)
public java.util.Vector discovererQuery(AbstractQueryItem query)
query
- The Query object containing the request for the discoverer
discovererQuery(DataObject)
protected DataObject discovererQuery(DataObject data)
Discoverer
public Error discovererUnregistration()
Discoverer
public DataObject discovererSubscriptionNotification(DataObject data)
protected DataObject leaseEndNotified(DataObject data)
data
- The data object specifying the lease end
public Lease getLease()
public void setLease(Lease lease)
public void activateDisplay()
public void deactivateDisplay()
public void setDisplay()
public void setDisplay(GenericFrame frame)
public void setDisplayName(java.lang.String objName)
public void setDisplayTitle(java.lang.String title)
public void println(java.lang.String s)
public static void debugprintln(boolean DEBUG_flag, java.lang.Object s)
s
- Any object, even nullpublic void setAllDebug(boolean baseObjectDebug, boolean communicationDebug, boolean componentDebug)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |