Package org.eclipse.scanning.event
Class ResponderImpl<T extends IdBean>
java.lang.Object
org.eclipse.scanning.event.ResponderImpl<T>
- All Implemented Interfaces:
AutoCloseable,IBeanClass<T>,IConnection,IRequestResponseConnection,IResponder<T>,IURIConnection
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCall to disconnectbooleanClass of bean usually extending StatusBeanThe underlyng service which the uri is connected usingThe topic used to request the responseThe topic used to send the response.getUri()The URI of this connection.inthashCode()booleanReturns whether this connection is connected.voidsetBeanClass(Class<T> beanClass) Class of bean usually extending StatusBean It is not compulsory to set the bean class unless trying to deserialize messages sent by older versions of the connector service.voidsetConnected(boolean connected) voidsetRequestTopic(String requestTopic) The topic used to request the responsevoidThe responder will be asked to respond to posts on the request topic of this object type.voidsetResponseTopic(String responseTopic) The topic used to send the response.voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.scanning.api.event.core.IConnection
close, isConnectedMethods inherited from interface org.eclipse.scanning.api.event.core.IRequestResponseConnection
getRequestTopic, getResponseTopic, setRequestTopic, setResponseTopicMethods inherited from interface org.eclipse.scanning.api.event.core.IURIConnection
getConnectorService, getUri
-
Field Details
-
eservice
-
-
Method Details
-
setResponseCreator
Description copied from interface:IResponderThe responder will be asked to respond to posts on the request topic of this object type.- Specified by:
setResponseCreatorin interfaceIResponder<T extends IdBean>- Parameters:
res-- Throws:
EventException
-
disconnect
Call to disconnect- Specified by:
disconnectin interfaceIConnection- Throws:
EventException
-
getBeanClass
Description copied from interface:IBeanClassClass of bean usually extending StatusBean- Specified by:
getBeanClassin interfaceIBeanClass<T extends IdBean>- Returns:
- class or null
-
setBeanClass
Description copied from interface:IBeanClassClass of bean usually extending StatusBean It is not compulsory to set the bean class unless trying to deserialize messages sent by older versions of the connector service.- Specified by:
setBeanClassin interfaceIBeanClass<T extends IdBean>
-
getConnectorService
Description copied from interface:IURIConnectionThe underlyng service which the uri is connected using- Specified by:
getConnectorServicein interfaceIURIConnection
-
getUri
Description copied from interface:IURIConnectionThe URI of this connection.- Specified by:
getUriin interfaceIURIConnection- Returns:
-
setUri
-
getRequestTopic
Description copied from interface:IRequestResponseConnectionThe topic used to request the response- Specified by:
getRequestTopicin interfaceIRequestResponseConnection- Returns:
-
setRequestTopic
Description copied from interface:IRequestResponseConnectionThe topic used to request the response- Specified by:
setRequestTopicin interfaceIRequestResponseConnection
-
getResponseTopic
Description copied from interface:IRequestResponseConnectionThe topic used to send the response.- Specified by:
getResponseTopicin interfaceIRequestResponseConnection- Returns:
-
setResponseTopic
Description copied from interface:IRequestResponseConnectionThe topic used to send the response.- Specified by:
setResponseTopicin interfaceIRequestResponseConnection
-
hashCode
public int hashCode() -
equals
-
isConnected
public boolean isConnected()Description copied from interface:IConnectionReturns whether this connection is connected. This method returnstrueuntil disconnect is called, even if the connection is created lazily.- Specified by:
isConnectedin interfaceIConnection- Returns:
trueif connected,falseotherwise
-
setConnected
public void setConnected(boolean connected)
-