private static void printPolicyComponent (TaggedComponent taggedComponent, PrintWriter out)
{
final CDRInputStream is = new CDRInputStream (taggedComponent.component_data);
try
{
int val;
int count = 0;
is.openEncapsulatedArray ();
int len = is.read_long ();
while (len-- != 0)
{
val = is.read_long ();
out.print( "\t\t#" + count++ + ": ");
is.openEncapsulation ();
switch (val)
{
case PRIORITY_BANDED_CONNECTION_POLICY_TYPE.value:
{
long i;
short low;
short high;
out.println ("RTCORBA::PRIORITY_BANDED_CONNECTION");
val = is.read_long ();
for (i = 0; i < val; i++)
{
low = is.read_short ();
high = is.read_short ();
out.println ("\t\t\tBand " + i + ": " + low + "-" + high);
}
break;
}
case PRIORITY_MODEL_POLICY_TYPE.value:
{
out.print("RTCORBA::PRIORITY_MODEL");
val = is.read_long ();
switch (val)
{
case PriorityModel._CLIENT_PROPAGATED:
{
out.print (" (CLIENT_PROPAGATED, ");
break;
}
case PriorityModel._SERVER_DECLARED:
{
out.print (" (SERVER_DECLARED, ");
break;
}
default:
{
out.print (" (Unknown, ");
break;
}
}
short prio = is.read_short ();
out.println (prio + ")");
break;
}
default:
{
out.println ("Unknown (" + val + ")");
break;
}
}
is.closeEncapsulation ();
}
}
finally
{
is.close();
}
}