@Override public synchronized NotifyFuture<ConfigurationInformation> getConfiguration ( final String factoryId, final String configurationId ) { logger.debug ( "Getting configuration: {} - {}", factoryId, configurationId ); return new ErrorAwareFuture<GetConfigurationResponse, ConfigurationInformation> ( this.executor, GetConfigurationResponse.class, sendRequestMessage ( new GetConfigurationRequest ( nextRequest (), factoryId, configurationId ) ) ) { @Override public ConfigurationInformation handleResponse ( final GetConfigurationResponse result ) { return result.getConfiguration (); } }; }
protected void handleGetConfigurationRequest ( final GetConfigurationRequest message ) throws InvalidSessionException { new ErrorAwareHandler<Configuration> ( message.getRequest (), this.service.getConfiguration ( this.session, message.getFactoryId (), message.getConfigurationId () ) ) { @Override protected ResponseMessage handle ( final Response response, final Configuration result ) { return new GetConfigurationResponse ( new Response ( message.getRequest () ), convertConfiguration ( result ) ); } }; }
@Override protected ResponseMessage handle ( final Response response, final Configuration result ) { return new GetConfigurationResponse ( new Response ( message.getRequest () ), convertConfiguration ( result ) ); } };
@Override protected ResponseMessage handle ( final Response response, final Configuration result ) { return new GetConfigurationResponse ( new Response ( message.getRequest () ), convertConfiguration ( result ) ); } };
protected void handleGetConfigurationRequest ( final GetConfigurationRequest message ) throws InvalidSessionException { new ErrorAwareHandler<Configuration> ( message.getRequest (), this.service.getConfiguration ( this.session, message.getFactoryId (), message.getConfigurationId () ) ) { @Override protected ResponseMessage handle ( final Response response, final Configuration result ) { return new GetConfigurationResponse ( new Response ( message.getRequest () ), convertConfiguration ( result ) ); } }; }
@Override public synchronized NotifyFuture<ConfigurationInformation> getConfiguration ( final String factoryId, final String configurationId ) { logger.debug ( "Getting configuration: {} - {}", factoryId, configurationId ); return new ErrorAwareFuture<GetConfigurationResponse, ConfigurationInformation> ( this.executor, GetConfigurationResponse.class, sendRequestMessage ( new GetConfigurationRequest ( nextRequest (), factoryId, configurationId ) ) ) { @Override public ConfigurationInformation handleResponse ( final GetConfigurationResponse result ) { return result.getConfiguration (); } }; }
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.ca.data.message.GetConfigurationRequest value = (org.eclipse.scada.ca.data.message.GetConfigurationRequest)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)3 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeRequest ( context, data, (byte)1, value.getRequest () ); context.encodeString ( data, (byte)2, value.getFactoryId () ); context.encodeString ( data, (byte)3, value.getConfigurationId () ); data.flip (); return data; }
return new org.eclipse.scada.ca.data.message.GetConfigurationRequest ( request, factoryId, configurationId );
@Override public IoBuffer encodeMessage ( final BinaryContext context, final Object objectMessage ) throws Exception { final org.eclipse.scada.ca.data.message.GetConfigurationRequest value = (org.eclipse.scada.ca.data.message.GetConfigurationRequest)objectMessage; final IoBuffer data = IoBuffer.allocate ( 64 ); data.setAutoExpand ( true ); // encode message base data.putInt ( MESSAGE_CODE ); // number of fields data.put ( (byte)3 ); // encode attributes org.eclipse.scada.core.protocol.ngp.codec.Structures.encodeRequest ( context, data, (byte)1, value.getRequest () ); context.encodeString ( data, (byte)2, value.getFactoryId () ); context.encodeString ( data, (byte)3, value.getConfigurationId () ); data.flip (); return data; }
return new org.eclipse.scada.ca.data.message.GetConfigurationRequest ( request, factoryId, configurationId );