X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fchannel%2FServiceRequest.java;h=e5a3b7e99d150391888c6112bbf37f0e874397e5;hb=refs%2Fchanges%2F38%2F238%2F2;hp=68dd5c73d6647b84d683810581d0cde2fcfd9a60;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceRequest.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceRequest.java index 68dd5c73d..e5a3b7e99 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceRequest.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/channel/ServiceRequest.java @@ -1,59 +1,59 @@ -package org.simantics.databoard.channel; - -import org.simantics.databoard.binding.Binding; - -/** - * This interface is intended to be used by service handler implementations. - * - * @author Toni Kalajainen - */ -public interface ServiceRequest { - - /** - * Context is an idetification of the requester. The actual implementation - * depends on the implementation of the channel. - * - * For example: TCP based implementation can publish user identification, - * security policy, application instance certificate, session identifier, - * socket address, etc.. - * - * Application local implementation may carry no data.

- * - * @return client context - */ - Object getClientContext(); - - /** - * Get the command specification of the request. - * - * The identifier of the spec is a well-known id of the requested service. - * - * @return command specification - */ - CommandSpec getCommandSpec(); - - /** - * Get an access to the request object. - * - * @param binding - * @return access to request - */ - Object getRequest(Binding binding); - - /** - * Send a successful result. Result can be sent from any thread but only once. - * - * @param binding - * @param result - */ - void sendResult( Binding binding, Object result ); - - /** - * Send an error result. Result can be sent from any thread but only once. - * - * @param binding - * @param error - */ - void sendError( Binding binding, Object error ); - -} +package org.simantics.databoard.channel; + +import org.simantics.databoard.binding.Binding; + +/** + * This interface is intended to be used by service handler implementations. + * + * @author Toni Kalajainen + */ +public interface ServiceRequest { + + /** + * Context is an idetification of the requester. The actual implementation + * depends on the implementation of the channel. + * + * For example: TCP based implementation can publish user identification, + * security policy, application instance certificate, session identifier, + * socket address, etc.. + * + * Application local implementation may carry no data.

+ * + * @return client context + */ + Object getClientContext(); + + /** + * Get the command specification of the request. + * + * The identifier of the spec is a well-known id of the requested service. + * + * @return command specification + */ + CommandSpec getCommandSpec(); + + /** + * Get an access to the request object. + * + * @param binding + * @return access to request + */ + Object getRequest(Binding binding); + + /** + * Send a successful result. Result can be sent from any thread but only once. + * + * @param binding + * @param result + */ + void sendResult( Binding binding, Object result ); + + /** + * Send an error result. Result can be sent from any thread but only once. + * + * @param binding + * @param error + */ + void sendError( Binding binding, Object error ); + +}