protected static org.eclipse.scada.core.data.OperationParameters makeParameters ( final OperationParameters operationParameters ) { if ( operationParameters == null ) { return null; } final Map<String, String> properties = new HashMap<String, String> ( 0 ); UserInformation userInformation = null; if ( operationParameters.getUserInformation () != null ) { userInformation = new UserInformation ( operationParameters.getUserInformation ().getName () ); } return new org.eclipse.scada.core.data.OperationParameters ( userInformation, properties ); }
public org.eclipse.scada.core.data.OperationParameters asData () { final org.eclipse.scada.core.data.UserInformation ui = this.userInformation == null ? null : new org.eclipse.scada.core.data.UserInformation ( this.userInformation.getName () ); return new org.eclipse.scada.core.data.OperationParameters ( ui, this.properties ); } }
public Request nextRequest () { return new Request ( this.sequenceNumber.incrementAndGet () ); } }
private void handleResponse ( final ResponseMessage message ) { this.callbackHandlerManager.unregisterHandler ( message.getResponse ().getRequest ().getRequestId () ); this.responseManager.handleResponse ( message ); }
@Override protected ResponseMessage handle ( final Response response, final Void result ) { return new ApplyDiffResponse ( new Response ( message.getRequest () ) ); } };
protected synchronized Long registerCallbackHandler ( final Request request, final CallbackHandler callbackHandler ) { if ( callbackHandler == null ) { return null; } else { this.callbackHandlerManager.registerHandler ( request.getRequestId (), callbackHandler ); return request.getRequestId (); } }
@Override public int hashCode () { final int prime = 31; int result = 1; result = ( prime * result ) + ( this.value == null ? 0 : this.value.hashCode () ); result = ( prime * result ) + ( this.subscriptionState == null ? 0 : this.subscriptionState.hashCode () ); result = ( prime * result ) + (int) ( this.timestamp ^ ( this.timestamp >>> 32 ) ); return result; }
protected static void inlineEncodeCallbackResponse ( final BinaryContext context, final IoBuffer data, final org.eclipse.scada.core.data.CallbackResponse value ) throws Exception { // number of fields data.put ( (byte)2 ); // encode attributes context.encodePrimitiveBoolean ( data, (byte)1, value.isCanceled () ); context.encodeProperties ( data, (byte)2, value.getAttributes () ); }
private void handleResponse ( final ResponseMessage message ) { this.callbackHandlerManager.unregisterHandler ( message.getResponse ().getRequest ().getRequestId () ); this.responseManager.handleResponse ( message ); }
@Override protected ResponseMessage handle ( final Response response, final Void result ) { return new ApplyDiffResponse ( new Response ( message.getRequest () ) ); } };
protected synchronized Long registerCallbackHandler ( final Request request, final CallbackHandler callbackHandler ) { if ( callbackHandler == null ) { return null; } else { this.callbackHandlerManager.registerHandler ( request.getRequestId (), callbackHandler ); return request.getRequestId (); } }
@Override public int hashCode () { final int prime = 31; int result = 1; result = ( prime * result ) + ( this.value == null ? 0 : this.value.hashCode () ); result = ( prime * result ) + ( this.subscriptionState == null ? 0 : this.subscriptionState.hashCode () ); result = ( prime * result ) + (int) ( this.timestamp ^ ( this.timestamp >>> 32 ) ); return result; }
public Request nextRequest () { return new Request ( this.sequenceNumber.incrementAndGet () ); } }
public void handleResponse ( final ResponseMessage message ) { final ExecutorFuture<ResponseMessage> request = this.requestMap.remove ( message.getResponse ().getRequest ().getRequestId () ); if ( request != null ) { this.statistics.setCurrentValue ( STATS_OPEN_REQUESTS, this.requestMap.size () ); // update info request.asyncSetResult ( message ); } }
@Override protected ResponseMessage handle ( final Response response, final Configuration result ) { return new GetConfigurationResponse ( new Response ( message.getRequest () ), convertConfiguration ( result ) ); } };
protected static void inlineEncodeRequest ( final BinaryContext context, final IoBuffer data, final org.eclipse.scada.core.data.Request value ) throws Exception { // number of fields data.put ( (byte)1 ); // encode attributes context.encodePrimitiveLong ( data, (byte)1, value.getRequestId () ); }
@Override public int hashCode () { final int prime = 31; int result = 1; result = prime * result + ( this.attributes == null ? 0 : this.attributes.hashCode () ); result = prime * result + ( this.subscriptionState == null ? 0 : this.subscriptionState.hashCode () ); result = prime * result + ( this.value == null ? 0 : this.value.hashCode () ); return result; }
public void handleResponse ( final ResponseMessage message ) { final ExecutorFuture<ResponseMessage> request = this.requestMap.remove ( message.getResponse ().getRequest ().getRequestId () ); if ( request != null ) { this.statistics.setCurrentValue ( STATS_OPEN_REQUESTS, this.requestMap.size () ); // update info request.asyncSetResult ( message ); } }
protected static void inlineEncodeRequest ( final BinaryContext context, final IoBuffer data, final org.eclipse.scada.core.data.Request value ) throws Exception { // number of fields data.put ( (byte)1 ); // encode attributes context.encodePrimitiveLong ( data, (byte)1, value.getRequestId () ); }
@Override public int hashCode () { final int prime = 31; int result = 1; result = prime * result + ( this.attributes == null ? 0 : this.attributes.hashCode () ); result = prime * result + ( this.subscriptionState == null ? 0 : this.subscriptionState.hashCode () ); result = prime * result + ( this.value == null ? 0 : this.value.hashCode () ); return result; }