com.jproxy.proxy.callback
Class HttpCallbackServer

java.lang.Object
  extended bycom.jproxy.proxy.callback.HttpCallbackServer
All Implemented Interfaces:
CallbackServer

public class HttpCallbackServer
extends java.lang.Object
implements CallbackServer

The implementation of remote object used to support callback This object is shared between several callers and one consumer. The callers an consumer are remote objects also. For each client that uses callbacks one instance of the class exists on the server. The remote object provides temporary storage for requests to be done on the client. All requests to perform callback on the client are stacked in the object. The client contacts the object in order to get the requests and then performs them in original order.

See Also:
com.jproxy.util.FIFOStack

Constructor Summary
HttpCallbackServer(java.util.Hashtable env)
          Constructs instance of remote object
 
Method Summary
 void clear()
          Removes all objects from the stack.
 boolean destroyRequest(boolean forceDestroy)
           
 java.lang.Object getResult(java.lang.Object o)
          The method may be used by invoker to get result of method call on callback object.
 int getSize()
          Returns a number of elements in the stack.
 java.lang.Object invoke(java.lang.Object o)
           
 boolean isPopActive()
           
 java.lang.Object peek()
          Peeks previosly pushed request object from stack without changing status of the stack.
 java.lang.Object pop()
          Pops previosly pushed request object from stack.
 java.util.Vector popAll()
          Paps all existing request objects from stack.
 java.util.Vector popAllWithResult(java.util.Vector results)
           
 void push(java.lang.Object o)
          Pushes the request object to FIFO stack.
 void setResult(java.lang.Object o)
          The method may be used by client that hosts callback object to return the result of callback to invoker.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpCallbackServer

public HttpCallbackServer(java.util.Hashtable env)
Constructs instance of remote object

Method Detail

push

public void push(java.lang.Object o)
Pushes the request object to FIFO stack.

Specified by:
push in interface CallbackServer
Parameters:
o - object that must be pushed to stack

invoke

public java.lang.Object invoke(java.lang.Object o)
Specified by:
invoke in interface CallbackServer

isPopActive

public boolean isPopActive()

peek

public java.lang.Object peek()
Peeks previosly pushed request object from stack without changing status of the stack.

Specified by:
peek in interface CallbackServer

getSize

public int getSize()
Returns a number of elements in the stack.

Specified by:
getSize in interface CallbackServer

pop

public java.lang.Object pop()
Pops previosly pushed request object from stack.

Specified by:
pop in interface CallbackServer

popAll

public java.util.Vector popAll()
Paps all existing request objects from stack.

Specified by:
popAll in interface CallbackServer

clear

public void clear()
Removes all objects from the stack.

Specified by:
clear in interface CallbackServer

setResult

public void setResult(java.lang.Object o)
The method may be used by client that hosts callback object to return the result of callback to invoker.

Specified by:
setResult in interface CallbackServer
Parameters:
o - the result from method call on callback object.

popAllWithResult

public java.util.Vector popAllWithResult(java.util.Vector results)
Specified by:
popAllWithResult in interface CallbackServer

getResult

public java.lang.Object getResult(java.lang.Object o)
The method may be used by invoker to get result of method call on callback object.

Specified by:
getResult in interface CallbackServer
Parameters:
o - object that describes session

destroyRequest

public boolean destroyRequest(boolean forceDestroy)


Copyright © JProxy LLC. All Rights Reserved.