Package org.cspoker.common.api.shared.context

Examples of org.cspoker.common.api.shared.context.ServerContext


    Pair<StaticServerContext, Queue<ServerEvent>> state;
    try {
      state = contexts.getOrCreate(credentials.getLeft(), new IFactory1<Pair<StaticServerContext, Queue<ServerEvent>>, LoginException>(){

        public Pair<StaticServerContext, Queue<ServerEvent>> create() throws LoginException {
          ServerContext serverContext = cspokerServer.login(credentials.getLeft(), credentials.getRight());
          final ConcurrentLinkedQueue<ServerEvent> eventQueue = new ConcurrentLinkedQueue<ServerEvent>();
          StaticServerContext staticServerContext = new XmlServerContext(serverContext,
              new UniversalServerListener(
                  new ServerEventListener(){
View Full Code Here


    this.cspokerServer = cspokerServer;
  }
 
  public ExternalRemoteServerContext login(String username, String password)
      throws LoginException, RemoteException {
    ServerContext rootServer = cspokerServer.login(username, password);
    RemoteServerContext context = new ExportingServerContext(
        new UnremoteServerContext(new AsynchronousServerContext(
            new SequencePreservingExecutor(GlobalThreadPool.getInstance()), rootServer)));
    try {
      UnicastRemoteObject.unexportObject(context, true);
View Full Code Here

TOP

Related Classes of org.cspoker.common.api.shared.context.ServerContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.