}
return (T) inPort;
}
return (T) input;
case ContextUri.ENDPOINT_OUT:
OutputContext output = instance.output();
if (curi.hasPort()) {
OutputPortContext outPort = output.port(curi.getPort());
if (outPort == null) {
throw new IllegalArgumentException("The URI port " + curi.getPort() + " does not exist in the given output configuration");
}