Package org.apache.etch.util

Examples of org.apache.etch.util.Resources


    }

    public void sessionAccepted( SocketChannel connection )
      throws Exception
    {
      Resources r = new Resources( resources );
      r.put( "connection", connection );
     
      ValueFactory vf = session.newValueFactory( uri );
      r.put( Transport.VALUE_FACTORY, vf );
     
      TransportMessage t = newTransport( uri, r );
     
      session.newServer( t, uri, r );
    }
View Full Code Here


    }

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

    @Override
    public void sessionAccepted( SocketAddress socketAddress ) throws Exception
    {
      ValueFactory vf = session.newValueFactory( uri );
      Resources r = new Resources( resources );

      r.put( UDP_LISTENER, listener );
      r.put( SOCKET_ADDRESS, socketAddress );
      r.put( Transport.VALUE_FACTORY, vf );

      TransportMessage t = udpTransportFactory.newTransport( uri, r );

      session.newServer( t, uri, r );
    }
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

   * @throws Exception
   */
  public static ServerFactory newListener( final String uri, Resources resources,
    final MyCuaeServerFactory implFactory ) throws Exception
  {
    final Resources res = initResources( resources );

    Transport<ServerFactory> listener =  TransportFactory.getListener( uri, res );
   
    return new DefaultServerFactory( listener, implFactory )
    {
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

   * @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

TOP

Related Classes of org.apache.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.