Java Code Examples for org.omg.CORBA.LongHolder

The following are top voted examples for showing how to use org.omg.CORBA.LongHolder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: javify   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long get_longlong() throws TypeMismatch
{
  try
    {
      return ((LongHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 2
Project: javify   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_longlong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 3
Project: javify   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_ulonglong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 4
Project: javify   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_longlong()
                      throws BAD_OPERATION
{
  check(TCKind._tk_longlong);
  return ((LongHolder) has).value;
}
 
Example 5
Project: javify   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_ulonglong()
                       throws BAD_OPERATION
{
  // LongHolder also holds ulonglong
  check(TCKind._tk_ulonglong);
  return ((LongHolder) has).value;
}
 
Example 6
Project: jvm-stm   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long get_longlong() throws TypeMismatch
{
  try
    {
      return ((LongHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 7
Project: jvm-stm   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_longlong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 8
Project: jvm-stm   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_ulonglong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 9
Project: jvm-stm   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_longlong()
                      throws BAD_OPERATION
{
  check(TCKind._tk_longlong);
  return ((LongHolder) has).value;
}
 
Example 10
Project: jvm-stm   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_ulonglong()
                       throws BAD_OPERATION
{
  // LongHolder also holds ulonglong
  check(TCKind._tk_ulonglong);
  return ((LongHolder) has).value;
}
 
Example 11
Project: JamVM-PH   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long get_longlong() throws TypeMismatch
{
  try
    {
      return ((LongHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 12
Project: JamVM-PH   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_longlong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 13
Project: JamVM-PH   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_ulonglong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 14
Project: JamVM-PH   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_longlong()
                      throws BAD_OPERATION
{
  check(TCKind._tk_longlong);
  return ((LongHolder) has).value;
}
 
Example 15
Project: JamVM-PH   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_ulonglong()
                       throws BAD_OPERATION
{
  // LongHolder also holds ulonglong
  check(TCKind._tk_ulonglong);
  return ((LongHolder) has).value;
}
 
Example 16
Project: classpath   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long get_longlong() throws TypeMismatch
{
  try
    {
      return ((LongHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 17
Project: classpath   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_longlong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 18
Project: classpath   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_ulonglong(long a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((LongHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
 
Example 19
Project: classpath   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_longlong()
                      throws BAD_OPERATION
{
  check(TCKind._tk_longlong);
  return ((LongHolder) has).value;
}
 
Example 20
Project: classpath   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public long extract_ulonglong()
                       throws BAD_OPERATION
{
  // LongHolder also holds ulonglong
  check(TCKind._tk_ulonglong);
  return ((LongHolder) has).value;
}
 
Example 21
Project: JAutoItX   File: OptTest.java   View source code 4 votes vote down vote up
@Test
public void setWinWaitDelay() {
	try {
		// delay 5 seconds
		Assert.assertEquals(Opt.DEFAULT_WIN_WAIT_DELAY,
				Opt.setWinWaitDelay(3000));
		final LongHolder time = new LongHolder(0);
		Thread thread = new Thread(new Runnable() {
			public void run() {
				long start = System.currentTimeMillis();
				Win.wait(NOTEPAD_TITLE);
				long end = System.currentTimeMillis();
				time.value = end - start;
			}
		});
		thread.start();
		runNotepad();
		sleep(4000);
		Assert.assertTrue(String.format("%d >= 3000", time.value),
				time.value >= 3000);
		Assert.assertTrue(String.format("%d <= 4000", time.value),
				time.value <= 4000);
		Assert.assertFalse(thread.isAlive());
		Win.close(NOTEPAD_TITLE);

		// delay 2 seconds
		Assert.assertEquals(3000, Opt.setWinWaitDelay(2000));
		time.value = 0;
		thread = new Thread(new Runnable() {
			public void run() {
				long start = System.currentTimeMillis();
				Win.wait(NOTEPAD_TITLE);
				long end = System.currentTimeMillis();
				time.value = end - start;
			}
		});
		thread.start();
		runNotepad();
		while (thread.isAlive()) {
			sleep(100);
		}
		Assert.assertTrue(String.format("%d >= 2000", time.value),
				time.value >= 2000);
		Assert.assertTrue(String.format("%d <= 3000", time.value),
				time.value <= 3000);
		Assert.assertFalse(thread.isAlive());
		Win.close(NOTEPAD_TITLE);
	} finally {
		// restore default win delay
		Opt.setWinWaitDelay(Opt.DEFAULT_WIN_WAIT_DELAY);
	}
}