public class DefaultServiceServer<T,S> extends java.lang.Object implements ServiceServer<T,S>
ServiceServer
.Constructor and Description |
---|
DefaultServiceServer(ServiceDeclaration serviceDeclaration,
ServiceResponseBuilder<T,S> serviceResponseBuilder,
AdvertiseAddress advertiseAddress,
org.ros.message.MessageDeserializer<T> messageDeserializer,
org.ros.message.MessageSerializer<S> messageSerializer,
org.ros.message.MessageFactory messageFactory,
java.util.concurrent.ScheduledExecutorService scheduledExecutorService) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ServiceServerListener<T,S> listener)
Add a
ServiceServerListener . |
org.jboss.netty.buffer.ChannelBuffer |
finishHandshake(ConnectionHeader incomingConnectionHeader) |
GraphName |
getName() |
java.net.URI |
getUri() |
org.jboss.netty.channel.ChannelHandler |
newRequestHandler() |
void |
shutdown()
Stops the service and unregisters it.
|
void |
signalOnMasterRegistrationFailure()
Signal all
ServiceServerListener s that the ServiceServer
has failed to register with the master. |
void |
signalOnMasterRegistrationSuccess()
Signal all
ServiceServerListener s that the ServiceServer
has been successfully registered with the master. |
void |
signalOnMasterUnregistrationFailure()
Signal all
ServiceServerListener s that the ServiceServer
has failed to unregister with the master. |
void |
signalOnMasterUnregistrationSuccess()
Signal all
ServiceServerListener s that the ServiceServer
has been successfully unregistered with the master. |
java.lang.String |
toString() |
public DefaultServiceServer(ServiceDeclaration serviceDeclaration, ServiceResponseBuilder<T,S> serviceResponseBuilder, AdvertiseAddress advertiseAddress, org.ros.message.MessageDeserializer<T> messageDeserializer, org.ros.message.MessageSerializer<S> messageSerializer, org.ros.message.MessageFactory messageFactory, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
public org.jboss.netty.buffer.ChannelBuffer finishHandshake(ConnectionHeader incomingConnectionHeader)
public java.net.URI getUri()
getUri
in interface ServiceServer<T,S>
URI
for this ServiceServer
public GraphName getName()
getName
in interface ServiceServer<T,S>
ServiceServer
public org.jboss.netty.channel.ChannelHandler newRequestHandler()
public void signalOnMasterRegistrationSuccess()
ServiceServerListener
s that the ServiceServer
has been successfully registered with the master.
Each listener is called in a separate thread.
public void signalOnMasterRegistrationFailure()
ServiceServerListener
s that the ServiceServer
has failed to register with the master.
Each listener is called in a separate thread.
public void signalOnMasterUnregistrationSuccess()
ServiceServerListener
s that the ServiceServer
has been successfully unregistered with the master.
Each listener is called in a separate thread.
public void signalOnMasterUnregistrationFailure()
ServiceServerListener
s that the ServiceServer
has failed to unregister with the master.
Each listener is called in a separate thread.
public void shutdown()
ServiceServer
shutdown
in interface ServiceServer<T,S>
public void addListener(ServiceServerListener<T,S> listener)
ServiceServer
ServiceServerListener
.addListener
in interface ServiceServer<T,S>
listener
- the ServiceServerListener
to addpublic java.lang.String toString()
toString
in class java.lang.Object