Tabnine Logo
SpaceFactory.getSpace
Code IndexAdd Tabnine to your IDE (free)

How to use
getSpace
method
in
org.jpos.space.SpaceFactory

Best Java code snippets using org.jpos.space.SpaceFactory.getSpace (Showing top 20 results out of 315)

origin: jpos/jPOS

/**
 * @return the default TransientSpace
 */
public static Space getSpace () {
  return getSpace (TSPACE, DEFAULT, null);
}
origin: jpos/jPOS

private Space grabSpace (Element e)
 throws ConfigurationException
{
  String uri = e != null ? e.getText() : "";
  return SpaceFactory.getSpace (uri);
}
origin: jpos/jPOS

@SuppressWarnings("unchecked")
private Space<String, Object> grabSpace(Element e)
{
  return (Space<String, Object>) SpaceFactory.getSpace(e != null ? e.getText() : "");
}
origin: jpos/jPOS

@SuppressWarnings("unchecked")
private Space<String,Object> grabSpace (Element e) {
  return (Space<String,Object>) SpaceFactory.getSpace (e != null ? e.getText() : "");
}
origin: jpos/jPOS

public SpaceProxy () throws RemoteException {
  super();
  sp = SpaceFactory.getSpace ();
  startService ();
}
public SpaceProxy (String spaceUri) throws RemoteException {
origin: jpos/jPOS

public SpaceProxy (String spaceUri) throws RemoteException {
  super ();
  sp = SpaceFactory.getSpace (spaceUri);
  startService ();
}
origin: jpos/jPOS

protected void startService () throws Exception {
  if (spaceName == null) 
    sp = SpaceFactory.getSpace ();
  else 
    sp = SpaceFactory.getSpace (spaceName);
  objectName = new ObjectName (Q2.QBEAN_NAME + 
    getName() + ",space=" +
    (spaceName != null ? spaceName : "default")
  );
  getServer().getMBeanServer().registerMBean (sp, objectName);
}
origin: jpos/jPOS

private LocalSpace grabSpace (Element e) throws ConfigurationException
{
  String uri = e != null ? e.getText() : "";
  Space sp = SpaceFactory.getSpace (uri);
  if (sp instanceof LocalSpace) {
    return (LocalSpace) sp;
  }
  throw new ConfigurationException ("Invalid space " + uri);
}
origin: jpos/jPOS

private LocalSpace grabSpace (Element e) 
  throws ConfigurationException
{
  String uri = e != null ? e.getText() : "";
  Space sp = SpaceFactory.getSpace (uri);
  if (sp instanceof LocalSpace) {
    return (LocalSpace) sp;
  }
  throw new ConfigurationException ("Invalid space " + uri);
}
origin: jpos/jPOS

@Test(expected = NullPointerException.class)
public void testGetSpaceThrowsNullPointerException2() throws Throwable {
SpaceFactory.getSpace("testSpaceFactoryScheme", "testSpaceFactoryName",
  null);
}
origin: jpos/jPOS

  public void setConfiguration (Configuration cfg) 
    throws ConfigurationException
  {
    sp = SpaceFactory.getSpace(cfg.get ("space", ""));
    queue = cfg.get ("queue", null);
    if (queue == null)
      throw new ConfigurationException ("Unspecified queue");
    timeout = cfg.getLong ("timeout", 60000L);
  }
}
origin: jpos/jPOS

public void testGetSpaceThrowsNullPointerException1() throws Throwable {
try {
  SpaceFactory.getSpace("testSpaceFactoryScheme",
    "testSpaceFactoryName", "testSpaceFactoryParam");
  fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
  assertNull("ex.getMessage()", ex.getMessage());
}
}
origin: jpos/jPOS

  public void setUp () throws Exception {
    sp = SpaceFactory.getSpace("tspace:txnmgrtest");
    q2 = new Q2("build/resources/test/org/jpos/transaction");
    q2.start();
  }
//    public void testSimpleTransaction() {
origin: jpos/jPOS

  @Override
  public void setConfiguration (Configuration cfg) throws ConfigurationException {
    super.setConfiguration(cfg);
    queueName = cfg.get("queue", null);
    if (queueName == null)
      throw new ConfigurationException("'queue' property not configured");
    sp = SpaceFactory.getSpace(cfg.get("space"));
    timeout = cfg.getLong("timeout", timeout);
  }
}
origin: jpos/jPOS

@Test
public void testGetSpace2() throws Throwable {
TSpace result = (TSpace) SpaceFactory.getSpace("testString");
assertTrue("result.isEmpty()", result.isEmpty());
}
origin: jpos/jPOS

private static Element createSchema() {
  Element schema = new Element("schema");
  schema.setAttribute("id","base");
  SpaceFactory.getSpace().put(SCHEMA_PREFIX+"base.xml", schema);
  return schema;
}
origin: jpos/jPOS

@Test
public void testWipe1() throws Throwable {
  SpaceUtil.wipe(SpaceFactory.getSpace(), "");
  assertTrue("Test completed without Exception", true);
  // dependencies on static and environment state led to removal of 1
  // assertion
}
origin: jpos/jPOS

@Test
public void testInpAll1() throws Throwable {
  Space sp = SpaceFactory.getSpace("testSpaceUtilSpaceUri");
  SpaceUtil.nextLong(sp, "");
  Object[] result = SpaceUtil.inpAll(sp, "");
  assertEquals("(TSpace) sp.entries.size()", 0, ((TSpace) sp).entries.size());
  assertFalse("(TSpace) sp.entries.containsKey(\"\")", ((TSpace) sp).entries.containsKey(""));
  assertEquals("result.length", 1, result.length);
  assertEquals("result[0]", 1L, result[0]);
}
origin: jpos/jPOS

@Test
public void testRdp() throws Throwable {
  Space sp = SpaceFactory.getSpace();
  SpaceInterceptor spaceInterceptor = new SpaceInterceptor(sp);
  Object result = spaceInterceptor.rdp(sp);
  assertNull("result", result);
  assertSame("spaceInterceptor.sp", sp, spaceInterceptor.sp);
}
origin: jpos/jPOS-EE

@BeforeClass
public static void setUp() {
  RestAssured.baseURI = APITest.BASE_URL;
  RestAssured.requestSpecification = new RequestSpecBuilder().build().contentType(MediaType.APPLICATION_JSON);
  sp = SpaceFactory.getSpace();
  if (sp.rdp ("JPOSEE:STARTED") == null) {
    System.setProperty("user.name", "admin");
    q2 = new Q2();
    q2.start();
  }
  ISOUtil.sleep(5000);
}
org.jpos.spaceSpaceFactorygetSpace

Popular methods of SpaceFactory

  • <init>
  • createSpace
  • getGCExecutor
  • normalize

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now