use of org.bytedeco.javacpp.FlyCapture2.Error in project ovirt-engine-sdk-java by oVirt.
the class SsoUtils method buildSsoRevokeUrl.
/**
* Construct SSO URL to revoke SSO token
*
* @param url oVirt engine URL
* @return URI to be used to revoke token
*/
public static URI buildSsoRevokeUrl(String url) {
try {
URI uri = new URI(url);
URIBuilder uriBuilder = new URIBuilder(String.format("%1$s://%2$s/ovirt-engine/services/sso-logout", uri.getScheme(), uri.getAuthority()));
return uriBuilder.build();
} catch (URISyntaxException ex) {
throw new Error("Failed to build SSO revoke URL", ex);
}
}
use of org.bytedeco.javacpp.FlyCapture2.Error in project openflowplugin by opendaylight.
the class StackedSegment method completeEntry.
private static boolean completeEntry(final OutboundQueueEntry entry, final OfHeader response) {
if (response instanceof Error) {
final Error err = (Error) response;
LOG.debug("Device-reported request XID {} failed {}:{}", response.getXid(), err.getTypeString(), err.getCodeString());
entry.fail(new DeviceRequestFailedException("Device-side failure", err));
return true;
}
return entry.complete(response);
}
use of org.bytedeco.javacpp.FlyCapture2.Error in project openflowplugin by opendaylight.
the class DeviceContextImplTest method testProcessReply.
@Test
public void testProcessReply() {
final Error mockedError = mock(Error.class);
deviceContext.processReply(mockedError);
verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
final OfHeader mockedOfHeader = mock(OfHeader.class);
deviceContext.processReply(mockedOfHeader);
verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
}
Aggregations