Interface IHostDelegate
- 
public interface IHostDelegate- Since:
 - CS5
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclientConnected(INCommHost host, IClient client)Called when a new client connects.voidclientDisconnected(INCommHost host, IClient client)Called when a client disconnects.voidexecute(INCommHost host, IRequest request)Called to process a received ncomm request.java.lang.Stringidentifier()voidncommError(INCommHost host, java.lang.Throwable e)Called if a ncomm request handler encounters an exception. 
 - 
 
- 
- 
Method Detail
- 
identifier
java.lang.String identifier()
- Returns:
 - a unique identifier
 
 
- 
clientConnected
void clientConnected(INCommHost host, IClient client)
Called when a new client connects. If a single client opens multiple connections this method is only called once for the first connection.- Parameters:
 host- - the INCommHost instanceclient- - ncomm client
 
- 
execute
void execute(INCommHost host, IRequest request) throws ServiceCallException, NativeCommException
Called to process a received ncomm request. The delegate can retrieve ncomm parameters from the passed request object and set results. If an error should be signaled to the ncomm client throw a ServiceCallException specifying an error code and message. Progress updates can be sent to the client usingIRequest.setProgress(String, double). This method can also be used to allow the ncomm client to abort the request.- Parameters:
 host- - the INCommHost instancerequest- - ncomm request object- Throws:
 ServiceCallException- - if an error should be signaled to the ncomm clientNativeCommException- - if an unexpected error occurs
 
- 
clientDisconnected
void clientDisconnected(INCommHost host, IClient client)
Called when a client disconnects. If a single client opens multiple connections this method is only called once when all the client's connections are closed.- Parameters:
 host- - the INCommHost instanceclient- - ncomm client
 
- 
ncommError
void ncommError(INCommHost host, java.lang.Throwable e)
Called if a ncomm request handler encounters an exception. Useful for logging.- Parameters:
 host- - the INCommHost instancee- - the error
 
 - 
 
 -