Package etch.util

Examples of etch.util.Resources


   * @throws Exception
   */
  public static Resources initResources( Resources resources ) throws Exception
  {
    if (resources == null)
      resources = new Resources();
    else
      resources = new Resources( resources );
   
    if (!resources.containsKey( QUEUED_POOL ))
      resources.put( QUEUED_POOL, new QueuedPool() );
   
    if (!resources.containsKey( FREE_POOL ))
View Full Code Here


    }

    public void sessionAccepted( SocketChannel connection )
      throws Exception
    {
      Resources r = new Resources( resources );
      r.put( "connection", connection );

      ValueFactory vf = session.newValueFactory();
      r.put( Transport.VALUE_FACTORY, vf );

      DeliveryService d = newTransport( uri, r );

      session.newServer( d, vf );
View Full Code Here

      transport.transportNotify( event );
    }

    public void sessionAccepted( Socket socket ) throws Exception
    {
      Resources r = new Resources( resources );
      r.put( SOCKET, socket );
     
      ValueFactory vf = session.newValueFactory();
      r.put( Transport.VALUE_FACTORY, vf );
     
      DeliveryService d = newTransport( uri, r );
     
      session.newServer( d, vf );
     
View Full Code Here

    msg.put( x, 123456789 );
    msg.put( y, 876543210 );
    msg.put( _mf__messageId, msgid );
//    System.out.println( "msg = "+msg );
   
    Resources res = new Resources();
    res.put( Transport.VALUE_FACTORY, vf );
    MyPacketSource ps = new MyPacketSource();
    Messagizer m = new Messagizer( ps, "foo:?Messagizer.format=binary", res );
    m.transportMessage( null, msg );
   
    int n = 900973;
View Full Code Here

    Message msg = new Message( sum, vf );
    msg.put( values, array );
    msg.put( _mf__messageId, msgid );
//    System.out.println( "msg = "+msg );
   
    Resources res = new Resources();
    res.put( Transport.VALUE_FACTORY, vf );
    MyPacketSource ps = new MyPacketSource();
    Messagizer m = new Messagizer( ps, "foo:?Messagizer.format=binary", res );
    m.transportMessage( null, msg );
   
    int n = 509520;
View Full Code Here

    }

    public void sessionAccepted( SocketChannel connection )
      throws Exception
    {
      Resources r = new Resources( resources );
      r.put( "connection", connection );

      ValueFactory vf = session.newValueFactory();
      r.put( Transport.VALUE_FACTORY, vf );

      DeliveryService d = newTransport( uri, r );

      session.newServer( d, vf );
View Full Code Here

  public TestMessagizer()
  {
    transport = new MyTransportPacket();
    session = new MySessionMessage();
   
    Resources res = new Resources();
    res.put( Transport.VALUE_FACTORY, vf );
   
    m = new Messagizer( transport, "foo:?Messagizer.format=binary", res );
    m.setSession( session );
  }
View Full Code Here

      transport.transportNotify( event );
    }

    public void sessionAccepted( Socket socket ) throws Exception
    {
      Resources r = new Resources( resources );
      r.put( SOCKET, socket );
     
      ValueFactory vf = session.newValueFactory();
      r.put( Transport.VALUE_FACTORY, vf );
     
      DeliveryService d = newTransport( uri, r );
     
      session.newServer( d, vf );
     
View Full Code Here

   * @throws Exception
   */
  public static Resources initResources( Resources resources ) throws Exception
  {
    if (resources == null)
      resources = new Resources();
    else
      resources = new Resources( resources );
   
    if (!resources.containsKey( QUEUED_POOL ))
      resources.put( QUEUED_POOL, new QueuedPool() );
   
    if (!resources.containsKey( FREE_POOL ))
View Full Code Here

   * @throws Exception
   */
  public static Transport<ServerFactory> newListener( final String uri, Resources resources,
    final MyCuaeServerFactory implFactory ) throws Exception
  {
    final Resources res = initResources( resources );
    if (!res.containsKey( Transport.VALUE_FACTORY ))
      res.put( Transport.VALUE_FACTORY, new MyValueFactoryCuae( "tcp:" ) );

    return TransportFactory.getListener( uri, res, new DefaultServerFactory( implFactory )
    {
      public void newServer( DeliveryService d, ValueFactory vf ) throws Exception
      {
        Pool qp = (Pool) res.get( QUEUED_POOL );
        Pool fp = (Pool) res.get( FREE_POOL );
        implFactory.newMyCuaeServer( d, qp, fp, (MyValueFactoryCuae) vf );
      }

      public ValueFactory newValueFactory()
      {
View Full Code Here

TOP

Related Classes of etch.util.Resources

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.